pub struct MessageComponentInteraction {
    pub application_id: Id<ApplicationMarker>,
    pub channel_id: Id<ChannelMarker>,
    pub data: MessageComponentInteractionData,
    pub guild_id: Option<Id<GuildMarker>>,
    pub guild_locale: Option<String>,
    pub id: Id<InteractionMarker>,
    pub kind: InteractionType,
    pub locale: String,
    pub member: Option<PartialMember>,
    pub message: Message,
    pub token: String,
    pub user: Option<User>,
}
Expand description

Information present in an Interaction::MessageComponent.

Fields

application_id: Id<ApplicationMarker>

ID of the associated application.

channel_id: Id<ChannelMarker>

ID of the channel the interaction was triggered from.

data: MessageComponentInteractionData

Data from the invoked command.

guild_id: Option<Id<GuildMarker>>

ID of the guild the interaction was triggered from.

guild_locale: Option<String>

Guild’s preferred locale.

Present when the command is used in a guild.

Defaults to en-US.

id: Id<InteractionMarker>

ID of the interaction.

kind: InteractionType

Type of the interaction.

locale: String

Selected language of the user who triggered the interaction.

member: Option<PartialMember>

Member that triggered the interaction.

Present when the command is used in a guild.

message: Message

Message object for the message this button belongs to.

This is currently not validated by the discord API and may be spoofed by malicious users.

token: String

Token of the interaction.

user: Option<User>

User that triggered the interaction.

Present when the command is used in a direct message.

Implementations

ID of the user that invoked the interaction.

This will first check for the member’s user’s ID and, if not present, then check the user’s ID.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more