Derive Macro serenity_commands::BasicOption

source ·
#[derive(BasicOption)]
{
    // Attributes available to this derive:
    #[choice]
}
Expand description

Derives BasicOption.

option_type can be "string", "integer", or "number".

§Examples

use serenity_commands::BasicOption;

#[derive(Debug, BasicOption)]
#[choice(option_type = "integer")]
enum Medal {
    #[choice(name = "Gold", value = 1)]
    Gold,

    #[choice(name = "Silver", value = 2)]
    Silver,

    #[choice(name = "Bronze", value = 3)]
    Bronze,
}