From b3638db82a779765ecdef274a73c299248acc6f1 Mon Sep 17 00:00:00 2001 From: Koke_Cacao Date: Fri, 29 Dec 2023 23:24:00 -0500 Subject: [PATCH] feat(interactions): implement Attachments field (#1392) --------- Co-authored-by: Fedor Lapshin --- interactions.go | 1 + webhook.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/interactions.go b/interactions.go index 6106856..c562463 100644 --- a/interactions.go +++ b/interactions.go @@ -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"` diff --git a/webhook.go b/webhook.go index 6d8e2fe..7e30b5b 100644 --- a/webhook.go +++ b/webhook.go @@ -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"` }