Skip to content

Commit 896d441

Browse files
authored
feat(MessageAttachment): add flags (#1626)
1 parent db5be56 commit 896d441

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

message.go

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -352,18 +352,27 @@ type MessageAllowedMentions struct {
352352

353353
// A MessageAttachment stores data for message attachments.
354354
type MessageAttachment struct {
355-
ID string `json:"id"`
356-
URL string `json:"url"`
357-
ProxyURL string `json:"proxy_url"`
358-
Filename string `json:"filename"`
359-
ContentType string `json:"content_type"`
360-
Width int `json:"width"`
361-
Height int `json:"height"`
362-
Size int `json:"size"`
363-
Ephemeral bool `json:"ephemeral"`
364-
DurationSecs float64 `json:"duration_secs"`
365-
Waveform string `json:"waveform"`
366-
}
355+
ID string `json:"id"`
356+
URL string `json:"url"`
357+
ProxyURL string `json:"proxy_url"`
358+
Filename string `json:"filename"`
359+
ContentType string `json:"content_type"`
360+
Width int `json:"width"`
361+
Height int `json:"height"`
362+
Size int `json:"size"`
363+
Ephemeral bool `json:"ephemeral"`
364+
DurationSecs float64 `json:"duration_secs"`
365+
Waveform string `json:"waveform"`
366+
Flags MessageAttachmentFlags `json:"flags"`
367+
}
368+
369+
// MessageAttachmentFlags is the flags of a message attachment.
370+
type MessageAttachmentFlags int
371+
372+
// Valid MessageAttachmentFlags values.
373+
const (
374+
MessageAttachmentFlagsIsRemix MessageAttachmentFlags = 1 << 2
375+
)
367376

368377
// MessageEmbedFooter is a part of a MessageEmbed struct.
369378
type MessageEmbedFooter struct {

0 commit comments

Comments
 (0)