pub struct ApplicationCommandInteractionData {
pub id: Snowflake,
pub name: String,
pub t: ApplicationCommandType,
pub resolved: Option<ResolvedData>,
pub options: Option<OptionList>,
pub guild_id: Option<Snowflake>,
pub target_id: Option<Snowflake>,
}
Expand description
Fields§
§id: Snowflake
the ID of the invoked command
name: String
the name of the invoked command
t: ApplicationCommandType
the type of the invoked command
resolved: Option<ResolvedData>
converted users + roles + channels + attachments
options: Option<OptionList>
the params + values from the user
guild_id: Option<Snowflake>
the id of the guild the command is registered to
target_id: Option<Snowflake>
Implementations§
Source§impl ApplicationCommandInteractionData
impl ApplicationCommandInteractionData
pub fn resolved_user(&self, snowflake: &Snowflake) -> Option<&User>
pub fn resolved_member(&self, snowflake: &Snowflake) -> Option<&PartialMember>
pub fn resolved_role(&self, snowflake: &Snowflake) -> Option<&Role>
pub fn first_option(&self) -> Option<&ApplicationCommandInteractionDataOption>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ApplicationCommandInteractionData
impl<'de> Deserialize<'de> for ApplicationCommandInteractionData
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 Freeze for ApplicationCommandInteractionData
impl RefUnwindSafe for ApplicationCommandInteractionData
impl Send for ApplicationCommandInteractionData
impl Sync for ApplicationCommandInteractionData
impl Unpin for ApplicationCommandInteractionData
impl UnwindSafe for ApplicationCommandInteractionData
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