Subscribe only to required intents

This commit is contained in:
Matte23
2021-11-25 10:26:58 +01:00
parent 8766dc1503
commit 4f6af025cf

View File

@@ -51,7 +51,7 @@ func main() {
dg.AddHandler(handleMessage) dg.AddHandler(handleMessage)
dg.AddHandler(handleVoiceActivity) dg.AddHandler(handleVoiceActivity)
dg.AddHandler(handlePresenceUpdate) dg.AddHandler(handlePresenceUpdate)
dg.Identify.Intents = discordgo.MakeIntent(discordgo.IntentsAll) dg.Identify.Intents = discordgo.MakeIntent(discordgo.IntentsGuildMessages | discordgo.IntentsGuildVoiceStates | discordgo.IntentsGuildPresences | discordgo.IntentsGuildMembers)
// Open a websocket connection to Discord and begin listening. // Open a websocket connection to Discord and begin listening.
err = dg.Open() err = dg.Open()