Przeglądaj źródła

Add omitempty to MessageReference's GuildID field

Direct Messages do not have the **guild_id** field for Message Referencing / the new Reply feature.
__Instead it is only **message_id** and **guild_id**__
Nicholas Phillips 4 lat temu
rodzic
commit
26be533516
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      message.go

+ 1 - 1
message.go

@@ -369,7 +369,7 @@ type MessageApplication struct {
 type MessageReference struct {
 	MessageID string `json:"message_id"`
 	ChannelID string `json:"channel_id"`
-	GuildID   string `json:"guild_id"`
+	GuildID   string `json:"guild_id,omitempty"`
 }
 
 // Reference returns MessageReference of given message