Łukasz Horonziak 4 years ago
parent
commit
de7803becd
3 changed files with 6 additions and 1 deletions
  1. 1 0
      discord.go
  2. 1 1
      structs.go
  3. 4 0
      util.go

+ 1 - 0
discord.go

@@ -74,6 +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 = MakeIntent(IntentsAllWithoutPrivileged)
 
 	// If no arguments are passed return the empty Session interface.
 	if args == nil {

+ 1 - 1
structs.go

@@ -1139,5 +1139,5 @@ const (
 	IntentsAll = IntentsAllWithoutPrivileged |
 		IntentsGuildMembers |
 		IntentsGuildPresences
-    IntentsNone Intent = 0
+	IntentsNone Intent = 0
 )

+ 4 - 0
util.go

@@ -15,3 +15,7 @@ func SnowflakeTimestamp(ID string) (t time.Time, err error) {
 	t = time.Unix(timestamp/1000, 0)
 	return
 }
+
+func MakeIntent(intents Intent) *Intent {
+	return &intents
+}