mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-05 09:26:10 +00:00
Document all limits in discord.ui
This commit is contained in:
@ -366,8 +366,10 @@ class Select(BaseSelect[V]):
|
||||
custom_id: :class:`str`
|
||||
The ID of the select menu that gets received during an interaction.
|
||||
If not given then one is generated for you.
|
||||
Can only be up to 100 characters.
|
||||
placeholder: Optional[:class:`str`]
|
||||
The placeholder text that is shown if nothing is selected, if any.
|
||||
Can only be up to 150 characters.
|
||||
min_values: :class:`int`
|
||||
The minimum number of items that must be chosen for this select menu.
|
||||
Defaults to 1 and must be between 0 and 25.
|
||||
@ -376,6 +378,7 @@ class Select(BaseSelect[V]):
|
||||
Defaults to 1 and must be between 1 and 25.
|
||||
options: List[:class:`discord.SelectOption`]
|
||||
A list of options that can be selected in this menu.
|
||||
Can only contain up to 25 items.
|
||||
disabled: :class:`bool`
|
||||
Whether the select is disabled or not.
|
||||
row: Optional[:class:`int`]
|
||||
@ -455,7 +458,8 @@ class Select(BaseSelect[V]):
|
||||
Can only be up to 100 characters.
|
||||
value: :class:`str`
|
||||
The value of the option. This is not displayed to users.
|
||||
If not given, defaults to the label. Can only be up to 100 characters.
|
||||
If not given, defaults to the label.
|
||||
Can only be up to 100 characters.
|
||||
description: Optional[:class:`str`]
|
||||
An additional description of the option, if any.
|
||||
Can only be up to 100 characters.
|
||||
@ -515,8 +519,10 @@ class UserSelect(BaseSelect[V]):
|
||||
custom_id: :class:`str`
|
||||
The ID of the select menu that gets received during an interaction.
|
||||
If not given then one is generated for you.
|
||||
Can only be up to 100 characters.
|
||||
placeholder: Optional[:class:`str`]
|
||||
The placeholder text that is shown if nothing is selected, if any.
|
||||
Can only be up to 150 characters.
|
||||
min_values: :class:`int`
|
||||
The minimum number of items that must be chosen for this select menu.
|
||||
Defaults to 1 and must be between 0 and 25.
|
||||
@ -527,6 +533,7 @@ class UserSelect(BaseSelect[V]):
|
||||
Whether the select is disabled or not.
|
||||
default_values: Sequence[:class:`~discord.abc.Snowflake`]
|
||||
A list of objects representing the users that should be selected by default.
|
||||
Number of items must be in range of ``min_values`` and ``max_values``.
|
||||
|
||||
.. versionadded:: 2.4
|
||||
row: Optional[:class:`int`]
|
||||
@ -604,8 +611,10 @@ class RoleSelect(BaseSelect[V]):
|
||||
custom_id: :class:`str`
|
||||
The ID of the select menu that gets received during an interaction.
|
||||
If not given then one is generated for you.
|
||||
Can only be up to 100 characters.
|
||||
placeholder: Optional[:class:`str`]
|
||||
The placeholder text that is shown if nothing is selected, if any.
|
||||
Can only be up to 150 characters.
|
||||
min_values: :class:`int`
|
||||
The minimum number of items that must be chosen for this select menu.
|
||||
Defaults to 1 and must be between 0 and 25.
|
||||
@ -616,6 +625,7 @@ class RoleSelect(BaseSelect[V]):
|
||||
Whether the select is disabled or not.
|
||||
default_values: Sequence[:class:`~discord.abc.Snowflake`]
|
||||
A list of objects representing the roles that should be selected by default.
|
||||
Number of items must be in range of ``min_values`` and ``max_values``.
|
||||
|
||||
.. versionadded:: 2.4
|
||||
row: Optional[:class:`int`]
|
||||
@ -688,8 +698,10 @@ class MentionableSelect(BaseSelect[V]):
|
||||
custom_id: :class:`str`
|
||||
The ID of the select menu that gets received during an interaction.
|
||||
If not given then one is generated for you.
|
||||
Can only be up to 100 characters.
|
||||
placeholder: Optional[:class:`str`]
|
||||
The placeholder text that is shown if nothing is selected, if any.
|
||||
Can only be up to 150 characters.
|
||||
min_values: :class:`int`
|
||||
The minimum number of items that must be chosen for this select menu.
|
||||
Defaults to 1 and must be between 0 and 25.
|
||||
@ -701,6 +713,7 @@ class MentionableSelect(BaseSelect[V]):
|
||||
default_values: Sequence[:class:`~discord.abc.Snowflake`]
|
||||
A list of objects representing the users/roles that should be selected by default.
|
||||
if :class:`.Object` is passed, then the type must be specified in the constructor.
|
||||
Number of items must be in range of ``min_values`` and ``max_values``.
|
||||
|
||||
.. versionadded:: 2.4
|
||||
row: Optional[:class:`int`]
|
||||
@ -778,10 +791,12 @@ class ChannelSelect(BaseSelect[V]):
|
||||
custom_id: :class:`str`
|
||||
The ID of the select menu that gets received during an interaction.
|
||||
If not given then one is generated for you.
|
||||
Can only be up to 100 characters.
|
||||
channel_types: List[:class:`~discord.ChannelType`]
|
||||
The types of channels to show in the select menu. Defaults to all channels.
|
||||
placeholder: Optional[:class:`str`]
|
||||
The placeholder text that is shown if nothing is selected, if any.
|
||||
Can only be up to 150 characters.
|
||||
min_values: :class:`int`
|
||||
The minimum number of items that must be chosen for this select menu.
|
||||
Defaults to 1 and must be between 0 and 25.
|
||||
@ -792,6 +807,7 @@ class ChannelSelect(BaseSelect[V]):
|
||||
Whether the select is disabled or not.
|
||||
default_values: Sequence[:class:`~discord.abc.Snowflake`]
|
||||
A list of objects representing the channels that should be selected by default.
|
||||
Number of items must be in range of ``min_values`` and ``max_values``.
|
||||
|
||||
.. versionadded:: 2.4
|
||||
row: Optional[:class:`int`]
|
||||
@ -1011,9 +1027,11 @@ def select(
|
||||
get overridden.
|
||||
placeholder: Optional[:class:`str`]
|
||||
The placeholder text that is shown if nothing is selected, if any.
|
||||
Can only be up to 150 characters.
|
||||
custom_id: :class:`str`
|
||||
The ID of the select menu that gets received during an interaction.
|
||||
It is recommended not to set this parameter to prevent conflicts.
|
||||
Can only be up to 100 characters.
|
||||
row: Optional[:class:`int`]
|
||||
The relative row this select menu belongs to. A Discord component can only have 5
|
||||
rows. By default, items are arranged automatically into those 5 rows. If you'd
|
||||
@ -1029,6 +1047,7 @@ def select(
|
||||
options: List[:class:`discord.SelectOption`]
|
||||
A list of options that can be selected in this menu. This can only be used with
|
||||
:class:`Select` instances.
|
||||
Can only contain up to 25 items.
|
||||
channel_types: List[:class:`~discord.ChannelType`]
|
||||
The types of channels to show in the select menu. Defaults to all channels. This can only be used
|
||||
with :class:`ChannelSelect` instances.
|
||||
@ -1037,6 +1056,7 @@ def select(
|
||||
default_values: Sequence[:class:`~discord.abc.Snowflake`]
|
||||
A list of objects representing the default values for the select menu. This cannot be used with regular :class:`Select` instances.
|
||||
If ``cls`` is :class:`MentionableSelect` and :class:`.Object` is passed, then the type must be specified in the constructor.
|
||||
Number of items must be in range of ``min_values`` and ``max_values``.
|
||||
|
||||
.. versionadded:: 2.4
|
||||
"""
|
||||
|
Reference in New Issue
Block a user