Trait serenity_commands::Subcommand
source · pub trait Subcommand: SubcommandGroup {
// Provided methods
fn create_option(
name: impl Into<String>,
description: impl Into<String>,
) -> CreateCommandOption { ... }
fn from_value(value: &CommandDataOptionValue) -> Result<Self> { ... }
}
Expand description
A sub-command which can be nested inside of a Command
or
SubcommandGroup
.
This is a sub-trait of SubcommandGroup
, as a Subcommand
can be used
anywhere a SubcommandGroup
can.
Provided Methods§
sourcefn create_option(
name: impl Into<String>,
description: impl Into<String>,
) -> CreateCommandOption
fn create_option( name: impl Into<String>, description: impl Into<String>, ) -> CreateCommandOption
Create the command option.
sourcefn from_value(value: &CommandDataOptionValue) -> Result<Self>
fn from_value(value: &CommandDataOptionValue) -> Result<Self>
Object Safety§
This trait is not object safe.