Skip to content

Commit

Permalink
refactor(WebhookParams): ignore empty Attachments field
Browse files Browse the repository at this point in the history
  • Loading branch information
FedorLap2006 committed Dec 30, 2023
1 parent bf1c59c commit e6d4ef6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type WebhookParams struct {
Files []*File `json:"-"`
Components []MessageComponent `json:"components"`
Embeds []*MessageEmbed `json:"embeds,omitempty"`
Attachments *[]*MessageAttachment `json:"attachments,omitempty"`
Attachments []*MessageAttachment `json:"attachments,omitempty"`
AllowedMentions *MessageAllowedMentions `json:"allowed_mentions,omitempty"`
// Only MessageFlagsSuppressEmbeds and MessageFlagsEphemeral can be set.
// MessageFlagsEphemeral can only be set when using Followup Message Create endpoint.
Expand Down

0 comments on commit e6d4ef6

Please sign in to comment.