From f55cb04a1cd759c8ef293acd7a815eddbfb618af Mon Sep 17 00:00:00 2001 From: mlnrDev Date: Wed, 20 Mar 2024 15:56:28 +0100 Subject: [PATCH] fix examples --- _examples/oauth2/example.go | 2 +- _examples/verified_roles/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_examples/oauth2/example.go b/_examples/oauth2/example.go index 6e1c323f..0154c727 100644 --- a/_examples/oauth2/example.go +++ b/_examples/oauth2/example.go @@ -87,7 +87,7 @@ func handleRoot(w http.ResponseWriter, r *http.Request) { } func handleLogin(w http.ResponseWriter, r *http.Request) { - http.Redirect(w, r, client.GenerateAuthorizationURL(baseURL+"/trylogin", discord.PermissionsNone, 0, false, discord.OAuth2ScopeIdentify, discord.OAuth2ScopeGuilds, discord.OAuth2ScopeEmail, discord.OAuth2ScopeConnections, discord.OAuth2ScopeWebhookIncoming), http.StatusSeeOther) + http.Redirect(w, r, client.GenerateAuthorizationURL(baseURL+"/trylogin", discord.PermissionsNone, 0, false, discord.ApplicationIntegrationTypeGuildInstall, discord.OAuth2ScopeIdentify, discord.OAuth2ScopeGuilds, discord.OAuth2ScopeEmail, discord.OAuth2ScopeConnections, discord.OAuth2ScopeWebhookIncoming), http.StatusSeeOther) } func handleTryLogin(w http.ResponseWriter, r *http.Request) { diff --git a/_examples/verified_roles/main.go b/_examples/verified_roles/main.go index 2fadbaa5..f4d26f8f 100644 --- a/_examples/verified_roles/main.go +++ b/_examples/verified_roles/main.go @@ -52,7 +52,7 @@ func main() { } func handleVerify(w http.ResponseWriter, r *http.Request) { - http.Redirect(w, r, oAuth2Client.GenerateAuthorizationURL(baseURL+"/callback", discord.PermissionsNone, 0, false, discord.OAuth2ScopeIdentify, discord.OAuth2ScopeRoleConnectionsWrite), http.StatusTemporaryRedirect) + http.Redirect(w, r, oAuth2Client.GenerateAuthorizationURL(baseURL+"/callback", discord.PermissionsNone, 0, false, discord.ApplicationIntegrationTypeGuildInstall, discord.OAuth2ScopeIdentify, discord.OAuth2ScopeRoleConnectionsWrite), http.StatusTemporaryRedirect) } func handleCallback(w http.ResponseWriter, r *http.Request) {