pub struct ApplicationCommandInteraction {Show 13 fields
pub id: InteractionId,
pub application_id: ApplicationId,
pub kind: InteractionType,
pub data: CommandData,
pub guild_id: Option<GuildId>,
pub channel_id: ChannelId,
pub member: Option<Member>,
pub user: User,
pub token: String,
pub version: u8,
pub app_permissions: Option<Permissions>,
pub locale: String,
pub guild_locale: Option<String>,
}Expand description
An interaction when a user invokes a slash command.
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: CommandDataThe 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.
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 ApplicationCommandInteraction
impl Clone for ApplicationCommandInteraction
source§fn clone(&self) -> ApplicationCommandInteraction
fn clone(&self) -> ApplicationCommandInteraction
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<'de> Deserialize<'de> for ApplicationCommandInteraction
impl<'de> Deserialize<'de> for ApplicationCommandInteraction
source§fn deserialize<D>(
deserializer: D
) -> Result<ApplicationCommandInteraction, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<ApplicationCommandInteraction, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for ApplicationCommandInteraction
impl Serialize for ApplicationCommandInteraction
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 ApplicationCommandInteraction
impl Send for ApplicationCommandInteraction
impl Sync for ApplicationCommandInteraction
impl Unpin for ApplicationCommandInteraction
impl UnwindSafe for ApplicationCommandInteraction
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