Łukasz Horonziak 4 years ago
parent
commit
349da37386
2 changed files with 36 additions and 1 deletions
  1. 1 1
      discord.go
  2. 35 0
      structs.go

+ 1 - 1
discord.go

@@ -74,7 +74,7 @@ func New(args ...interface{}) (s *Session, err error) {
 	s.Identify.GuildSubscriptions = true
 	s.Identify.Properties.OS = runtime.GOOS
 	s.Identify.Properties.Browser = "DiscordGo v" + VERSION
-	s.Identify.Intents = 32767
+	s.Identify.Intents = IntentsAllWithoutPrivileged
 
 	// If no arguments are passed return the empty Session interface.
 	if args == nil {

+ 35 - 0
structs.go

@@ -1103,3 +1103,38 @@ const (
 
 	ErrCodeReactionBlocked = 90001
 )
+
+const (
+	IntentsGuilds = 1 << iota
+	IntentsGuildMembers
+	IntentsGuildBans
+	IntentsGuildEmojis
+	IntentsGuildIntegrations
+	IntentsGuildWebhooks
+	IntentsGuildInvites
+	IntentsGuildVoiceStates
+	IntentsGuildPresences
+	IntentsGuildMessages
+	IntentsGuildMessageReactions
+	IntentsGuildMessageTyping
+	IntentsDirectMessagesMessages
+	IntentsDirectMessageReaction
+	IntentsDirectMessageTyping
+
+	IntentsAllWithoutPrivileged = IntentsGuilds |
+		IntentsGuildBans |
+		IntentsGuildEmojis |
+		IntentsGuildIntegrations |
+		IntentsGuildWebhooks |
+		IntentsGuildInvites |
+		IntentsGuildVoiceStates |
+		IntentsGuildMessages |
+		IntentsGuildMessageReactions |
+		IntentsGuildMessageTyping |
+		IntentsDirectMessagesMessages |
+		IntentsDirectMessageReaction |
+		IntentsDirectMessageTyping
+	IntentsAll = IntentsAllWithoutPrivileged |
+		IntentsGuildMembers |
+		IntentsGuildPresences
+)