more
This commit is contained in:
@@ -6,8 +6,8 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func getDiscordUser(token string) User {
|
||||
req, err := http.NewRequest("GET", "https://discord.com/api/v19/users/@me", nil)
|
||||
func GetDiscordUser(token string) User {
|
||||
req, err := http.NewRequest("GET", "https://discord.com/api/v10/users/@me", nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@@ -24,7 +24,7 @@ func getDiscordUser(token string) User {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var respObj = User{}
|
||||
var respObj User
|
||||
err = json.Unmarshal(respBody, &respObj)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
||||
Reference in New Issue
Block a user