Explorar o código

Remove GuildSubscriptions field from Identify struct (#992)

Co-authored-by: rigormorrtiss <rigormorrtiss@gmail.com>
Fedor Lapshin %!s(int64=2) %!d(string=hai) anos
pai
achega
0413c18206
Modificáronse 2 ficheiros con 7 adicións e 9 borrados
  1. 0 1
      discord.go
  2. 7 8
      structs.go

+ 0 - 1
discord.go

@@ -49,7 +49,6 @@ func New(token string) (s *Session, err error) {
 	// These can be modified prior to calling Open()
 	s.Identify.Compress = true
 	s.Identify.LargeThreshold = 250
-	s.Identify.GuildSubscriptions = true
 	s.Identify.Properties.OS = runtime.GOOS
 	s.Identify.Properties.Browser = "DiscordGo v" + VERSION
 	s.Identify.Intents = IntentsAllWithoutPrivileged

+ 7 - 8
structs.go

@@ -1695,14 +1695,13 @@ const (
 // Identify is sent during initial handshake with the discord gateway.
 // https://discord.com/developers/docs/topics/gateway#identify
 type Identify struct {
-	Token              string              `json:"token"`
-	Properties         IdentifyProperties  `json:"properties"`
-	Compress           bool                `json:"compress"`
-	LargeThreshold     int                 `json:"large_threshold"`
-	Shard              *[2]int             `json:"shard,omitempty"`
-	Presence           GatewayStatusUpdate `json:"presence,omitempty"`
-	GuildSubscriptions bool                `json:"guild_subscriptions"`
-	Intents            Intent              `json:"intents"`
+	Token          string              `json:"token"`
+	Properties     IdentifyProperties  `json:"properties"`
+	Compress       bool                `json:"compress"`
+	LargeThreshold int                 `json:"large_threshold"`
+	Shard          *[2]int             `json:"shard,omitempty"`
+	Presence       GatewayStatusUpdate `json:"presence,omitempty"`
+	Intents        Intent              `json:"intents"`
 }
 
 // IdentifyProperties contains the "properties" portion of an Identify packet