diff --git a/discord/message.go b/discord/message.go index 2f1031db..0a2ff180 100644 --- a/discord/message.go +++ b/discord/message.go @@ -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"` @@ -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"`