Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions discord/ui/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Select(Item[V]):
def __init__(
self,
*,
custom_id: str = MISSING,
custom_id: str = None,
placeholder: Optional[str] = None,
min_values: int = 1,
max_values: int = 1,
Expand All @@ -110,8 +110,8 @@ def __init__(
if not (isinstance(custom_id, str) or custom_id is None):
raise TypeError(f"expected custom_id to be str, not {custom_id.__class__.__name__}")

self._provided_custom_id = custom_id is not MISSING
custom_id = os.urandom(16).hex() if custom_id is MISSING else custom_id
self._provided_custom_id = custom_id is not None
custom_id = os.urandom(16).hex() if custom_id is None else custom_id
options = [] if options is MISSING else options
self._underlying = SelectMenu._raw_construct(
custom_id=custom_id,
Expand Down Expand Up @@ -297,7 +297,7 @@ def is_dispatchable(self) -> bool:
def select(
*,
placeholder: Optional[str] = None,
custom_id: str = MISSING,
custom_id: str = None,
min_values: int = 1,
max_values: int = 1,
options: List[SelectOption] = MISSING,
Expand Down