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**__
This commit is contained in:
Nicholas Phillips 2020-12-03 16:49:07 -05:00 committed by GitHub
parent 31f70d4394
commit 26be533516
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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