Default SelectOption.value to the label if not given

This commit is contained in:
Rapptz
2021-05-28 09:43:15 -04:00
parent b84c199c70
commit f321efd4de
2 changed files with 7 additions and 6 deletions

View File

@ -158,7 +158,7 @@ class Select(Item[V]):
self,
*,
label: str,
value: str,
value: str = MISSING,
description: Optional[str] = None,
emoji: Optional[Union[str, PartialEmoji]] = None,
default: bool = False,
@ -175,7 +175,7 @@ class Select(Item[V]):
Can only be up to 25 characters.
value: :class:`str`
The value of the option. This is not displayed to users.
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 50 characters.