Function twilight_validate::command::choice
source · pub fn choice(
choice: &CommandOptionChoice
) -> Result<(), CommandValidationError>
Expand description
Validate a single [CommandOptionChoice
].
§Errors
Returns an error of type OptionChoiceNameLengthInvalid
if the name is
less than OPTION_CHOICE_NAME_LENGTH_MIN
or more than OPTION_CHOICE_NAME_LENGTH_MAX
.