Document all limits in discord.ui

This commit is contained in:
Soheab_
2024-01-27 02:08:00 +01:00
committed by GitHub
parent 841e9157bd
commit 070ae24d8d
5 changed files with 36 additions and 7 deletions

View File

@ -65,21 +65,27 @@ class TextInput(Item[V]):
------------
label: :class:`str`
The label to display above the text input.
Can only be up to 45 characters.
custom_id: :class:`str`
The ID of the text input that gets received during an interaction.
If not given then one is generated for you.
Can only be up to 100 characters.
style: :class:`discord.TextStyle`
The style of the text input.
placeholder: Optional[:class:`str`]
The placeholder text to display when the text input is empty.
Can only be up to 100 characters.
default: Optional[:class:`str`]
The default value of the text input.
Can only be up to 4000 characters.
required: :class:`bool`
Whether the text input is required.
min_length: Optional[:class:`int`]
The minimum length of the text input.
Must be between 0 and 4000.
max_length: Optional[:class:`int`]
The maximum length of the text input.
Must be between 1 and 4000.
row: Optional[:class:`int`]
The relative row this text input belongs to. A Discord component can only have 5
rows. By default, items are arranged automatically into those 5 rows. If you'd