diff --git a/message.go b/message.go index 3b03ed5f9..07bdc21e7 100644 --- a/message.go +++ b/message.go @@ -135,11 +135,14 @@ type Message struct { // If the field exists but is null, the referenced message was deleted. ReferencedMessage *Message `json:"referenced_message"` + // 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, // instead including a MessageReference, as components exist on preexisting messages. Interaction *MessageInteraction `json:"interaction"` + InteractionMetadata *MessageInteractionMetadata `json:"interaction_metadata"` + // The flags of the message, which describe extra features of a message. // This is a combination of bit masks; the presence of a certain permission can // be checked by performing a bitwise AND between this int and the flag. @@ -567,3 +570,14 @@ type MessageInteraction struct { // Member is only present when the interaction is from a guild. Member *Member `json:"member"` } + +// MessageInteractionMetadata contains metadata of an interaction, including relevant user info. +type MessageInteractionMetadata struct { + ID string `json:"id"` + Type InteractionType `json:"type"` + User *User `json:"user"` + AuthorizingIntegrationOwners map[ApplicationIntegrationType]string `json:"authorizing_integration_owners"` + OriginalResponseMessageID string `json:"original_response_message_id,omitempty"` + InteractedMessageID string `json:"interacted_message_id,omitempty"` + TriggeringInteractionMetadata *MessageInteractionMetadata `json:"triggering_interaction_metadata,omitempty"` +}