Derive Macro serenity_commands::SubCommandGroup
source · #[derive(SubCommandGroup)]
{
// Attributes available to this derive:
#[command]
}
Expand description
Derives SubCommandGroup
.
Each field of named variants must implement BasicOption
.
The inner type of newtype variants must implement SubCommand
.
Examples
use serenity_commands::{SubCommand, SubCommandGroup};
#[derive(SubCommand)]
struct AddSubCommand {
/// First number.
a: f64,
/// Second number.
b: f64,
}
#[derive(SubCommandGroup)]
enum Math {
/// Add two numbers.
Add(AddSubCommand),
/// Negate a number.
Negate {
/// The number to negate.
a: f64,
},
}