pub struct ApplicationCommand {
pub command_id: Option<CommandId>,
pub bot_id: Option<BotId>,
pub kind: CommandType,
pub name: String,
pub name_localizations: BTreeMap<String, String>,
pub description: String,
pub description_localizations: BTreeMap<String, String>,
pub options: Vec<CommandOption>,
pub default_member_permissions: Option<Permissions>,
}Expand description
An application command (§8.14).
Fields§
§command_id: Option<CommandId>Host-assigned; absent in command.set.
bot_id: Option<BotId>The bot that owns it: in command.list and command.updated, absent elsewhere.
kind: CommandTypeSlash, user or message command.
name: StringThe name.
name_localizations: BTreeMap<String, String>Localized names.
description: String1–100 scalars for slash commands; "" for user and message commands.
description_localizations: BTreeMap<String, String>Localized descriptions.
options: Vec<CommandOption>Slash commands only, ≤ 25.
default_member_permissions: Option<Permissions>Bits the invoker needs in the channel; "0" is owner only; absent is everyone.
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 (const: unstable) · 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<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 PartialEq for ApplicationCommand
impl PartialEq for ApplicationCommand
Source§impl Serialize for ApplicationCommand
impl Serialize for ApplicationCommand
impl StructuralPartialEq for ApplicationCommand
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