Trait serenity_commands::SubCommandGroup

source ·
pub trait SubCommandGroup: Sized {
    // Required 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 group which can be nested inside of a Command and contains SubCommands.

Required Methods§

source

fn create_option( name: impl Into<String>, description: impl Into<String>, ) -> CreateCommandOption

Create the command option.

source

fn from_value(value: &CommandDataOptionValue) -> Result<Self>

Extract data from a CommandDataOptionValue.

§Errors

Returns an error if the implementation fails.

Object Safety§

This trait is not object safe.

Implementors§