pub struct ApplicationCommand {Show 16 fields
pub id: Option<Snowflake>,
pub application_id: Option<Snowflake>,
pub guild_id: Option<Snowflake>,
pub kind: u8,
pub name: String,
pub name_localizations: Option<HashMap<String, String>>,
pub description: String,
pub description_localizations: Option<HashMap<String, String>>,
pub options: Vec<ApplicationCommandOption>,
pub default_member_permissions: Option<PermissionsBitField>,
pub dm_permission: Option<bool>,
pub integration_types: Option<Vec<ApplicationIntegrationType>>,
pub contexts: Option<Vec<InteractionContextType>>,
pub handler: Option<ApplicationCommandHandlerType>,
pub version: Option<Snowflake>,
pub nsfw: Option<bool>,
}Expand description
Typed Discord API object for ApplicationCommand.
Fields§
§id: Option<Snowflake>§application_id: Option<Snowflake>§guild_id: Option<Snowflake>§kind: u8§name: String§name_localizations: Option<HashMap<String, String>>§description: String§description_localizations: Option<HashMap<String, String>>§options: Vec<ApplicationCommandOption>§default_member_permissions: Option<PermissionsBitField>§dm_permission: Option<bool>§integration_types: Option<Vec<ApplicationIntegrationType>>§contexts: Option<Vec<InteractionContextType>>§handler: Option<ApplicationCommandHandlerType>§version: Option<Snowflake>§nsfw: Option<bool>Implementations§
Trait Implementations§
Source§impl Clone for ApplicationCommand
impl Clone for ApplicationCommand
Source§fn clone(&self) -> ApplicationCommand
fn clone(&self) -> ApplicationCommand
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 Debug for ApplicationCommand
impl Debug for ApplicationCommand
Source§impl Default for ApplicationCommand
impl Default for ApplicationCommand
Source§fn default() -> ApplicationCommand
fn default() -> ApplicationCommand
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ApplicationCommand
impl<'de> Deserialize<'de> for ApplicationCommand
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
Source§impl From<CommandDefinition> for ApplicationCommand
impl From<CommandDefinition> for ApplicationCommand
Source§fn from(value: CommandDefinition) -> Self
fn from(value: CommandDefinition) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ApplicationCommand
impl RefUnwindSafe for ApplicationCommand
impl Send for ApplicationCommand
impl Sync for ApplicationCommand
impl Unpin for ApplicationCommand
impl UnsafeUnpin for ApplicationCommand
impl UnwindSafe for ApplicationCommand
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