Skip to content

Commit

Permalink
feat(Message): add MessageSnapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
FedorLap2006 committed Mar 4, 2025
1 parent 00db80a commit 37a2344
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions message.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ type Message struct {
// If the field exists but is null, the referenced message was deleted.
ReferencedMessage *Message `json:"referenced_message"`

// The message associated with the message_reference.
// This is a minimal subset of fields in a message (e.g. Author is excluded)
// NOTE: This field is only returned when referenced when MessageReference.Type is MessageReferenceTypeForward.
MessageSnapshots []MessageSnapshot `json:"message_snapshots"`

// Deprecated, use InteractionMetadata.
// Is sent when the message is a response to an Interaction, without an existing message.
// This means responses to message component interactions do not include this property,
Expand Down Expand Up @@ -471,6 +476,12 @@ type MessageApplication struct {
Name string `json:"name"`
}

// MessageSnapshot represents a snapshot of forwarded messages.
// https://discord.com/developers/docs/resources/message#message-snapshot-object
type MessageSnapshot struct {
Message *Message `json:"message"`
}

// MessageReferenceType is a type of MessageReference
type MessageReferenceType int

Expand Down

0 comments on commit 37a2344

Please sign in to comment.