pub struct MessageComponentInteraction {Show 14 fields
pub id: InteractionId,
pub application_id: ApplicationId,
pub kind: InteractionType,
pub data: MessageComponentInteractionData,
pub guild_id: Option<GuildId>,
pub channel_id: ChannelId,
pub member: Option<Member>,
pub user: User,
pub token: String,
pub version: u8,
pub message: Message,
pub app_permissions: Option<Permissions>,
pub locale: String,
pub guild_locale: Option<String>,
}Expand description
An interaction triggered by a message component.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: InteractionIdId of the interaction.
application_id: ApplicationIdId of the application this interaction is for.
kind: InteractionTypeThe type of interaction.
data: MessageComponentInteractionDataThe data of the interaction which was triggered.
guild_id: Option<GuildId>The guild Id this interaction was sent from, if there is one.
channel_id: ChannelIdThe channel Id this interaction was sent from.
member: Option<Member>The member data for the invoking user.
Note: It is only present if the interaction is triggered in a guild.
user: UserThe user object for the invoking user.
token: StringA continuation token for responding to the interaction.
version: u8Always 1.
message: MessageThe message this interaction was triggered by, if it is a component.
app_permissions: Option<Permissions>Permissions the app or bot has within the channel the interaction was sent from.
locale: StringThe selected language of the invoking user.
guild_locale: Option<String>The guild’s preferred locale.
Trait Implementations§
source§impl Clone for MessageComponentInteraction
impl Clone for MessageComponentInteraction
source§fn clone(&self) -> MessageComponentInteraction
fn clone(&self) -> MessageComponentInteraction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for MessageComponentInteraction
impl Debug for MessageComponentInteraction
source§impl<'de> Deserialize<'de> for MessageComponentInteraction
impl<'de> Deserialize<'de> for MessageComponentInteraction
source§fn deserialize<D>(
deserializer: D
) -> Result<MessageComponentInteraction, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<MessageComponentInteraction, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for MessageComponentInteraction
impl Serialize for MessageComponentInteraction
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more