feat(Message): add MessageSnapshots (#1604)

This commit is contained in:
Fedor Lapshin 2025-03-04 13:13:56 +03:00 committed by GitHub
parent 00db80a651
commit 2d15f13e65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,
@ -471,6 +476,12 @@ type MessageApplication struct {
Name string `json:"name"`
}
// MessageSnapshot represents a snapshot of a forwarded message.
// 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