Struct twilight_model::application::command::Command [−][src]
pub struct Command {
pub application_id: Option<ApplicationId>,
pub guild_id: Option<GuildId>,
pub name: String,
pub default_permission: Option<bool>,
pub description: String,
pub id: Option<CommandId>,
pub kind: CommandType,
pub options: Vec<CommandOption>,
}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.
Fields
application_id: Option<ApplicationId>guild_id: Option<GuildId>Guild ID of the command, if not global.
name: Stringdefault_permission: Option<bool>description: Stringid: Option<CommandId>kind: CommandTypeoptions: Vec<CommandOption>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
Instruments this type with the provided Span, returning an
Instrumented wrapper. 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