#[non_exhaustive]pub enum CommandValidationErrorType {
Show 15 variants
CountInvalid,
CommandTooLarge {
characters: usize,
},
DescriptionInvalid,
DescriptionNotAllowed,
NameLengthInvalid,
NameCharacterInvalid {
character: char,
},
OptionDescriptionInvalid,
OptionNameLengthInvalid,
OptionNameNotUnique {
option_index: usize,
},
OptionNameCharacterInvalid {
character: char,
},
OptionChoiceNameLengthInvalid,
OptionChoiceStringValueLengthInvalid,
OptionsCountInvalid,
OptionsRequiredFirst {
index: usize,
},
PermissionsCountInvalid,
}
Expand description
Type of CommandValidationError
that occurred.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CountInvalid
Too many commands have been provided.
The maximum number of commands is defined by
GUILD_COMMAND_LIMIT
.
CommandTooLarge
Combined values of the command are larger than
COMMAND_TOTAL_LENGTH
.
This includes name or the longest name localization, description or the longest description localization of the command and its options and the choice names or the longest name localization and the choice value if it is a string choice.
DescriptionInvalid
Command description is invalid.
DescriptionNotAllowed
Command description must be a empty string.
NameLengthInvalid
Command name length is invalid.
NameCharacterInvalid
Command name contain an invalid character.
OptionDescriptionInvalid
Command option description is invalid.
OptionNameLengthInvalid
Command option name length is invalid.
OptionNameNotUnique
Command option name is non-unique.
OptionNameCharacterInvalid
Command option name contain an invalid character.
OptionChoiceNameLengthInvalid
Command option choice name length is invalid.
OptionChoiceStringValueLengthInvalid
String command option choice value length is invalid.
OptionsCountInvalid
Command options count invalid.
OptionsRequiredFirst
Required command options have to be passed before optional ones.
PermissionsCountInvalid
More than 10 permission overwrites were set.