pub struct Interaction<'a> {Show 13 fields
pub id: Snowflake,
pub application_id: Snowflake,
pub interaction_type: InteractionType,
pub data: Option<InteractionData<'a>>,
pub guild_id: Option<Snowflake>,
pub channel_id: Option<Snowflake>,
pub member: Option<GuildMember<'a>>,
pub user: Option<User<'a>>,
pub token: String,
pub version: u8,
pub message: Option<Box<Message<'a>>>,
pub locale: Option<TitanString<'a>>,
pub guild_locale: Option<TitanString<'a>>,
}Expand description
Incoming Interaction.
Fields§
§id: SnowflakeInteraction ID.
application_id: SnowflakeApplication ID.
interaction_type: InteractionTypeType of interaction.
data: Option<InteractionData<'a>>Data payload.
guild_id: Option<Snowflake>Guild ID.
channel_id: Option<Snowflake>Channel ID.
member: Option<GuildMember<'a>>Member (if in guild).
user: Option<User<'a>>User (if in DM).
token: StringToken for responding.
version: u8Protocol version.
message: Option<Box<Message<'a>>>Message (primary for components).
locale: Option<TitanString<'a>>Locale.
guild_locale: Option<TitanString<'a>>Guild locale.
Trait Implementations§
Source§impl<'a> Clone for Interaction<'a>
impl<'a> Clone for Interaction<'a>
Source§fn clone(&self) -> Interaction<'a>
fn clone(&self) -> Interaction<'a>
Returns a duplicate 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<'a> Debug for Interaction<'a>
impl<'a> Debug for Interaction<'a>
Source§impl<'de, 'a> Deserialize<'de> for Interaction<'a>
impl<'de, 'a> Deserialize<'de> for Interaction<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Interaction<'a>
impl<'a> RefUnwindSafe for Interaction<'a>
impl<'a> Send for Interaction<'a>
impl<'a> Sync for Interaction<'a>
impl<'a> Unpin for Interaction<'a>
impl<'a> UnwindSafe for Interaction<'a>
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