#[non_exhaustive]pub enum InteractionMetadata {
ApplicationCommand(CommandMetadata),
MessageComponent(ComponentMetadata),
ModalSubmit(ModalSubmitMetadata),
Unknown(UnknownMetadata),
}Expand description
Metadata about the interaction a message was sent for: its ID, who triggered it and the installations that authorized it.
One variant per interaction type (D-063). The fields every variant has are available through
methods (id, user, …).
discord.js counterpart: MessageInteractionMetadata (Message#interactionMetadata).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ApplicationCommand(CommandMetadata)
A slash command or context menu command.
MessageComponent(ComponentMetadata)
A message component (button, select menu, …).
ModalSubmit(ModalSubmitMetadata)
A submitted modal.
Unknown(UnknownMetadata)
An interaction type this version of the library does not know about.
Implementations§
Source§impl InteractionMetadata
impl InteractionMetadata
Sourcepub const fn id(&self) -> InteractionId
pub const fn id(&self) -> InteractionId
Returns the interaction’s ID.
discord.js counterpart: MessageInteractionMetadata#id.
Sourcepub const fn kind(&self) -> InteractionType
pub const fn kind(&self) -> InteractionType
Returns the interaction type.
discord.js counterpart: MessageInteractionMetadata#type.
Sourcepub const fn user(&self) -> &User
pub const fn user(&self) -> &User
Returns the user who triggered the interaction.
discord.js counterpart: MessageInteractionMetadata#user.
Returns the installations that authorized the interaction.
discord.js counterpart: MessageInteractionMetadata#authorizingIntegrationOwners.
Sourcepub const fn original_response_message_id(&self) -> Option<MessageId>
pub const fn original_response_message_id(&self) -> Option<MessageId>
Returns the original response message, on follow-up messages.
discord.js counterpart: MessageInteractionMetadata#originalResponseMessageId.