Skip to content

Commit

Permalink
support multiple snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
mlnrDev committed Apr 26, 2024
1 parent 0ea8c17 commit 508e5e2
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion discord/message.go
Expand Up @@ -102,7 +102,7 @@ type Message struct {
Type MessageType `json:"type"`
Flags MessageFlags `json:"flags"`
MessageReference *MessageReference `json:"message_reference,omitempty"`
MessageSnapshot *Message `json:"message_snapshot,omitempty"`
MessageSnapshots []MessageSnapshot `json:"message_snapshots,omitempty"`
Interaction *MessageInteraction `json:"interaction,omitempty"`
WebhookID *snowflake.ID `json:"webhook_id,omitempty"`
Activity *MessageActivity `json:"activity,omitempty"`
Expand Down Expand Up @@ -414,6 +414,20 @@ const (
MessageReferenceTypeForward
)

type MessageSnapshot struct {
Message PartialMessage `json:"message"`
GuildID *snowflake.ID `json:"guild_id"`
}

type PartialMessage struct {
Content string `json:"content,omitempty"`
Embeds []Embed `json:"embeds,omitempty"`
Attachments []Attachment `json:"attachments"`
CreatedAt time.Time `json:"timestamp"`
EditedTimestamp *time.Time `json:"edited_timestamp"`
Flags MessageFlags `json:"flags"`
}

// MessageInteraction is sent on the Message object when the message is a response to an interaction
type MessageInteraction struct {
ID snowflake.ID `json:"id"`
Expand Down

0 comments on commit 508e5e2

Please sign in to comment.