Struct twilight_model::application::interaction::message_component::MessageComponentInteraction
source · [−]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: MessageComponentInteractionDataData 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: InteractionTypeType of the interaction.
locale: StringSelected 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: MessageMessage 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: StringToken of the interaction.
user: Option<User>User that triggered the interaction.
Present when the command is used in a direct message.
Implementations
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for MessageComponentInteraction
impl Send for MessageComponentInteraction
impl Sync for MessageComponentInteraction
impl Unpin for MessageComponentInteraction
impl UnwindSafe for MessageComponentInteraction
Blanket Implementations
Mutably borrows from an owned value. Read more
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