pub struct ApplicationCommand {
pub id: Option<Snowflake>,
pub command_type: Option<CommandType>,
pub application_id: Option<Snowflake>,
pub guild_id: Option<Snowflake>,
pub name: String,
pub description: String,
pub options: Vec<CommandOption>,
pub default_member_permissions: Option<String>,
pub dm_permission: Option<bool>,
pub nsfw: bool,
pub version: Option<Snowflake>,
}Expand description
Application command structure.
Fields§
§id: Option<Snowflake>Unique ID of the command.
command_type: Option<CommandType>Type of command.
application_id: Option<Snowflake>Application ID.
guild_id: Option<Snowflake>Guild ID (if guild-specific).
name: StringName of the command (1-32 chars).
description: StringDescription (1-100 characters).
options: Vec<CommandOption>Parameters for the command.
default_member_permissions: Option<String>Default Permissions.
dm_permission: Option<bool>Whether usable in DMs.
nsfw: boolWhether unsafe for age-gated users.
version: Option<Snowflake>Version ID.
Implementations§
Source§impl ApplicationCommand
impl ApplicationCommand
Sourcepub fn builder<'a>(
name: impl Into<TitanString<'a>>,
description: impl Into<TitanString<'a>>,
) -> CommandBuilder<'a>
pub fn builder<'a>( name: impl Into<TitanString<'a>>, description: impl Into<TitanString<'a>>, ) -> CommandBuilder<'a>
Create a builder for an ApplicationCommand.
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<'de> Deserialize<'de> for ApplicationCommand
impl<'de> Deserialize<'de> for ApplicationCommand
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApplicationCommand, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ApplicationCommand, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ApplicationCommand
impl Serialize for ApplicationCommand
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 Freeze for ApplicationCommand
impl RefUnwindSafe for ApplicationCommand
impl Send for ApplicationCommand
impl Sync for ApplicationCommand
impl Unpin 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