From ed40d55f999dfdbcc603ce76d00821ac3a4fb205 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 16 Jan 2023 20:54:29 -0500 Subject: [PATCH] Fix overloads for select decorator --- discord/ui/select.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/discord/ui/select.py b/discord/ui/select.py index be489526f..859a3f5a3 100644 --- a/discord/ui/select.py +++ b/discord/ui/select.py @@ -673,7 +673,7 @@ class ChannelSelect(BaseSelect[V]): @overload def select( *, - cls: Type[SelectT] = Select, + cls: Type[SelectT] = Select[V], options: List[SelectOption] = MISSING, channel_types: List[ChannelType] = ..., placeholder: Optional[str] = ..., @@ -689,7 +689,7 @@ def select( @overload def select( *, - cls: Type[UserSelectT], + cls: Type[UserSelectT] = UserSelect[V], options: List[SelectOption] = MISSING, channel_types: List[ChannelType] = ..., placeholder: Optional[str] = ..., @@ -705,7 +705,7 @@ def select( @overload def select( *, - cls: Type[RoleSelectT], + cls: Type[RoleSelectT] = RoleSelect[V], options: List[SelectOption] = MISSING, channel_types: List[ChannelType] = ..., placeholder: Optional[str] = ..., @@ -721,7 +721,7 @@ def select( @overload def select( *, - cls: Type[ChannelSelectT], + cls: Type[ChannelSelectT] = ChannelSelect[V], options: List[SelectOption] = MISSING, channel_types: List[ChannelType] = ..., placeholder: Optional[str] = ..., @@ -737,7 +737,7 @@ def select( @overload def select( *, - cls: Type[MentionableSelectT], + cls: Type[MentionableSelectT] = MentionableSelect[V], options: List[SelectOption] = MISSING, channel_types: List[ChannelType] = MISSING, placeholder: Optional[str] = ..., @@ -787,7 +787,7 @@ def select( .. versionchanged:: 2.1 Added the following keyword-arguments: ``cls``, ``channel_types`` - + Example --------- .. code-block:: python3