Expand description
Constants, error types, and functions for validating [Command
]s.
Structs§
- Command
Validation Error - Error created when a [
Command
] is invalid.
Enums§
- Command
Validation Error Type - Type of
CommandValidationError
that occurred.
Constants§
- CHOICES_
LIMIT - Maximum number of choices an option can have.
- COMMAND_
TOTAL_ LENGTH - The maximum combined command length in codepoints.
- DESCRIPTION_
LENGTH_ MAX - Maximum length of a command’s description.
- DESCRIPTION_
LENGTH_ MIN - Minimum length of a command’s description.
- GUILD_
COMMAND_ LIMIT - Maximum number of commands an application may have in an individual guild.
- GUILD_
COMMAND_ PERMISSION_ LIMIT - Maximum number of permission overwrites an application may have in an individual guild command.
- NAME_
LENGTH_ MAX - Maximum length of a command’s name.
- NAME_
LENGTH_ MIN - Minimum length of a command’s name.
- OPTIONS_
LIMIT - Maximum amount of options a command may have.
- OPTION_
CHOICE_ NAME_ LENGTH_ MAX - Maximum length of an option choice name.
- OPTION_
CHOICE_ NAME_ LENGTH_ MIN - Minimum length of an option choice name.
- OPTION_
CHOICE_ STRING_ VALUE_ LENGTH_ MAX - Maximum length of an option choice string value.
- OPTION_
CHOICE_ STRING_ VALUE_ LENGTH_ MIN - Minimum length of an option choice string value.
- OPTION_
DESCRIPTION_ LENGTH_ MAX - Maximum length of a command’s description.
- OPTION_
DESCRIPTION_ LENGTH_ MIN - Minimum length of a command’s description.
- OPTION_
NAME_ LENGTH_ MAX - Maximum length of a command’s name.
- OPTION_
NAME_ LENGTH_ MIN - Minimum length of a command’s name.
Functions§
- chat_
input_ name - Validate the name of a
ChatInput
command. - choice
- Validate a single [
CommandOptionChoice
]. - choice_
name - Validate a single name localization in a [
CommandOptionChoice
]. - command
- Validate a [
Command
]. - command_
characters - Calculate the total character count of a command.
- description
- Validate the description of a [
Command
]. - guild_
permissions - Validate the number of guild command permission overwrites.
- name
- Validate the name of a
User
orMessage
command. - option
- Validate a single [
CommandOption
]. - option_
characters - Calculate the total character count of a command option.
- option_
name - Validate the name of a [
CommandOption
]. - options
- Validate a list of command options for count, order, and internal validity.