Appearance
discohook.components
Classes
- ActionRow
- Checkbox
- CheckboxGroup
- CheckboxGroupOption
- Container
- FileUpload
- Label
- Media
- MediaGallery
- RadioGroup
- RadioGroupOption
- Section
- Separator
- TextDisplay
- TextInput
- Thumbnail
ActionRow
discohook.components.ActionRow
Action row component.
Arguments
- components (
Tuple[Button | Select]): Components to include in the action row. Must be between 1 and 5 components. - id (
int | None): Unique id for the action row.
Attributes
- id (
int): Action row id. - type (
ComponentType): Action row type. - components (
List[Component]): Action row components.
Checkbox
discohook.components.Checkbox
CheckboxGroup
discohook.components.CheckboxGroup
CheckboxGroupOption
discohook.components.CheckboxGroupOption
Container
discohook.components.Container
FileUpload
discohook.components.FileUpload
Represents a file upload component in a modal.
Arguments
- id (
int): A unique id of the file upload field. Must be a valid python identifier. - min_values (
int): Minimum number of items that must be uploaded (defaults to 1) - max_values (
int): Maximum number of items that must be uploaded (defaults to 1) - required (
bool): Whether this component is required to be filled (defaults to true).
Label
discohook.components.Label
Media
discohook.components.Media
Media component.
Arguments
- media (
str | File): Media to include in the media component. - description (
str | None): Media description. - spoiler (
bool): Whether the media should be spoiler or not.
MediaGallery
discohook.components.MediaGallery
RadioGroup
discohook.components.RadioGroup
RadioGroupOption
discohook.components.RadioGroupOption
Section
discohook.components.Section
Separator
discohook.components.Separator
TextDisplay
discohook.components.TextDisplay
TextInput
discohook.components.TextInput
Represents a text input field in a modal.
Arguments
- custom_id (
str): The label of the text input field. Must be a valid python identifier. - id (
int | None): A unique id of the text input field. Must be a valid python identifier. - required (
bool): Whether this component is required to be filled (defaults to true). - placeholder (
str | None): Custom placeholder text if the input is empty; max 100 characters. - value (
str | None): Pre-filled value for this component; max 4000 characters. - min_length (
int): The minimum length of the text input field. - max_length (
int): The maximum length of the text input field. - style (
TextInputFieldLength): The style of the text input field.
Thumbnail
discohook.components.Thumbnail
