Struct twilight_model::application::command::Command
source · [−]pub struct Command {
pub application_id: Option<ApplicationId>,
pub default_permission: Option<bool>,
pub description: String,
pub guild_id: Option<GuildId>,
pub id: Option<CommandId>,
pub kind: CommandType,
pub name: String,
pub options: Vec<CommandOption>,
pub version: CommandVersionId,
}Expand description
Data sent to discord to create a command.
CommandOptions that are required must be listed before optional ones.
Command names must be lower case, matching the Regex ^[\w-]{1,32}$. Refer
to the discord docs for more information.
This struct has an associated builder in the twilight-util crate.
Fields
application_id: Option<ApplicationId>default_permission: Option<bool>description: Stringguild_id: Option<GuildId>Guild ID of the command, if not global.
id: Option<CommandId>kind: CommandTypename: Stringoptions: Vec<CommandOption>version: CommandVersionIdAutoincrementing version identifier.
Trait Implementations
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 RefUnwindSafe for Command
impl UnwindSafe for Command
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more