Expand description
Constants, error types, and functions for validating Components.
Structs§
- Component
Validation Error - A provided
Componentis invalid.
Enums§
- Component
Validation Error Type - Type of
ComponentValidationErrorthat occurred.
Constants§
- ACTION_
ROW_ COMPONENT_ COUNT - Maximum number of
Components allowed inside anActionRow. - COMPONENT_
BUTTON_ LABEL_ LENGTH - Maximum
Componentlabel length in codepoints. - COMPONENT_
COUNT - Maximum number of root
Components in a message. - COMPONENT_
CUSTOM_ ID_ LENGTH - Maximum length of a
Componentcustom ID in codepoints. - COMPONENT_
V2_ COUNT - Maximum total number of
Components in a component V2 message. - FILE_
UPLOAD_ MAXIMUM_ VALUES_ LIMIT - Maximum value of
FileUpload::max_values. - FILE_
UPLOAD_ MINIMUM_ VALUES_ LIMIT - Maximum value of
FileUpload::min_values. - LABEL_
DESCRIPTION_ LENGTH_ MAX - Maximum length of a label description.
- LABEL_
LABEL_ LENGTH_ MAX - Maximum length of the label text of a label component.
- MEDIA_
GALLERY_ ITEMS_ MAX - Maximum amount of items in a media gallery.
- MEDIA_
GALLERY_ ITEMS_ MIN - Minimum amount of items in a media gallery.
- MEDIA_
GALLERY_ ITEM_ DESCRIPTION_ LENGTH_ MAX - Maximum length of a description of a media gallery item.
- SECTION_
COMPONENTS_ MAX - Maximum amount of components in a section.
- SECTION_
COMPONENTS_ MIN - Minimum amount of components in a section.
- SELECT_
MAXIMUM_ VALUES_ LIMIT - Maximum number of
SelectMenuOptions that can be chosen in aSelectMenu. - SELECT_
MAXIMUM_ VALUES_ REQUIREMENT - Minimum number of
SelectMenuOptions that can be chosen in aSelectMenu. - SELECT_
MINIMUM_ VALUES_ LIMIT - Maximum number of
SelectMenuOptions that must be chosen in aSelectMenu. - SELECT_
OPTION_ COUNT - Maximum number of
SelectMenuOptions in aSelectMenu. - SELECT_
OPTION_ DESCRIPTION_ LENGTH - Maximum length of a
SelectMenuOption::descriptionin codepoints. - SELECT_
OPTION_ LABEL_ LENGTH - Maximum length of a
SelectMenuOption::labelin codepoints. - SELECT_
OPTION_ VALUE_ LENGTH - Maximum length of a
SelectMenuOption::valuein codepoints. - SELECT_
PLACEHOLDER_ LENGTH - Maximum length of a
SelectMenu::placeholderin codepoints. - TEXT_
DISPLAY_ CONTENT_ LENGTH_ MAX - Maximum length of text display content.
- TEXT_
INPUT_ LABEL_ MAX - Maximum length of
TextInput::label. - TEXT_
INPUT_ LABEL_ MIN - Minimum length of
TextInput::label. - TEXT_
INPUT_ LENGTH_ MAX - Maximum length of
TextInput::value. - TEXT_
INPUT_ LENGTH_ MIN - Minimum length of
TextInput::value. - TEXT_
INPUT_ PLACEHOLDER_ MAX - Maximum length of a
TextInput::placeholderin codepoints. - THUMBNAIL_
DESCRIPTION_ LENGTH_ MAX - Maximum length of a thumbnail description.
Functions§
- action_
row - Ensure that an action row is correct.
- button
- Ensure that a button is correct.
- component
Deprecated - Ensure that a top-level request component is correct in V1.
- component_
v1 - Ensure that a top-level request component is correct in V1.
- component_
v2 - Ensure that a top-level request component is correct in V2.
- container
- Validates a container component.
- file_
upload - Validates a file upload component.
- label
- Ensure that a label is correct.
- media_
gallery - Validates a media gallery component.
- media_
gallery_ item - Validates a media gallery item
- section
- Validates a section component.
- select_
menu - Ensure that a select menu is correct.
- text_
display - Validates a text display component.
- text_
input - Ensure that a text input is correct.
- thumbnail
- Validates a thumbnail component.