Skip to content

Struct command::object::CommandOption

zaun_community_protocol::command::object::CommandOption · Struct

pub struct CommandOption { … }

An option of a command or subcommand.

The kind of value.

1–32, Discord’s name pattern.

name_localizations: BTreeMap<String, String>

Section titled “name_localizations: BTreeMap<String, String>”

Localized names.

1–100 scalars.

description_localizations: BTreeMap<String, String>

Section titled “description_localizations: BTreeMap<String, String>”

Localized descriptions.

Required options come before optional ones; never on subcommands.

≤ 25 fixed choices (string, integer and number options).

Subcommand and group children.

Channel options: the kinds offered.

Integer and number bounds.

Integer and number bounds.

String length bounds, 0–6 000.

String length bounds, 1–6 000.

The bot suggests values as the invoker types (not with choices).

Clone, Debug, Deserialize<'de>, PartialEq, Serialize, StructuralPartialEq

Full rustdoc page