From 896d441c57cf1ffd7592bf8bb63186908d5c5c9c Mon Sep 17 00:00:00 2001 From: Fedor Lapshin Date: Sat, 24 May 2025 13:38:06 +0300 Subject: [PATCH] feat(MessageAttachment): add flags (#1626) --- message.go | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/message.go b/message.go index 453f9e2..4954ed4 100644 --- a/message.go +++ b/message.go @@ -352,19 +352,28 @@ type MessageAllowedMentions struct { // A MessageAttachment stores data for message attachments. type MessageAttachment struct { - ID string `json:"id"` - URL string `json:"url"` - ProxyURL string `json:"proxy_url"` - Filename string `json:"filename"` - ContentType string `json:"content_type"` - Width int `json:"width"` - Height int `json:"height"` - Size int `json:"size"` - Ephemeral bool `json:"ephemeral"` - DurationSecs float64 `json:"duration_secs"` - Waveform string `json:"waveform"` + ID string `json:"id"` + URL string `json:"url"` + ProxyURL string `json:"proxy_url"` + Filename string `json:"filename"` + ContentType string `json:"content_type"` + Width int `json:"width"` + Height int `json:"height"` + Size int `json:"size"` + Ephemeral bool `json:"ephemeral"` + DurationSecs float64 `json:"duration_secs"` + Waveform string `json:"waveform"` + Flags MessageAttachmentFlags `json:"flags"` } +// MessageAttachmentFlags is the flags of a message attachment. +type MessageAttachmentFlags int + +// Valid MessageAttachmentFlags values. +const ( + MessageAttachmentFlagsIsRemix MessageAttachmentFlags = 1 << 2 +) + // MessageEmbedFooter is a part of a MessageEmbed struct. type MessageEmbedFooter struct { Text string `json:"text,omitempty"`