feat(interactions): implement Attachments field (#1392)

---------

Co-authored-by: Fedor Lapshin <fe.lap.prog@gmail.com>
This commit is contained in:
Koke_Cacao 2023-12-29 23:24:00 -05:00 committed by GitHub
parent 13748a3431
commit b3638db82a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -554,6 +554,7 @@ type InteractionResponseData struct {
Embeds []*MessageEmbed `json:"embeds"`
AllowedMentions *MessageAllowedMentions `json:"allowed_mentions,omitempty"`
Files []*File `json:"-"`
Attachments *[]*MessageAttachment `json:"attachments,omitempty"`
// NOTE: only MessageFlagsSuppressEmbeds and MessageFlagsEphemeral can be set.
Flags MessageFlags `json:"flags,omitempty"`

View file

@ -34,6 +34,7 @@ type WebhookParams struct {
Files []*File `json:"-"`
Components []MessageComponent `json:"components"`
Embeds []*MessageEmbed `json:"embeds,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.
@ -49,5 +50,6 @@ type WebhookEdit struct {
Components *[]MessageComponent `json:"components,omitempty"`
Embeds *[]*MessageEmbed `json:"embeds,omitempty"`
Files []*File `json:"-"`
Attachments *[]*MessageAttachment `json:"attachments,omitempty"`
AllowedMentions *MessageAllowedMentions `json:"allowed_mentions,omitempty"`
}