mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-23 03:16:48 +00:00
Fix overloads for select decorator
This commit is contained in:
parent
ef7d740524
commit
ed40d55f99
@ -673,7 +673,7 @@ class ChannelSelect(BaseSelect[V]):
|
|||||||
@overload
|
@overload
|
||||||
def select(
|
def select(
|
||||||
*,
|
*,
|
||||||
cls: Type[SelectT] = Select,
|
cls: Type[SelectT] = Select[V],
|
||||||
options: List[SelectOption] = MISSING,
|
options: List[SelectOption] = MISSING,
|
||||||
channel_types: List[ChannelType] = ...,
|
channel_types: List[ChannelType] = ...,
|
||||||
placeholder: Optional[str] = ...,
|
placeholder: Optional[str] = ...,
|
||||||
@ -689,7 +689,7 @@ def select(
|
|||||||
@overload
|
@overload
|
||||||
def select(
|
def select(
|
||||||
*,
|
*,
|
||||||
cls: Type[UserSelectT],
|
cls: Type[UserSelectT] = UserSelect[V],
|
||||||
options: List[SelectOption] = MISSING,
|
options: List[SelectOption] = MISSING,
|
||||||
channel_types: List[ChannelType] = ...,
|
channel_types: List[ChannelType] = ...,
|
||||||
placeholder: Optional[str] = ...,
|
placeholder: Optional[str] = ...,
|
||||||
@ -705,7 +705,7 @@ def select(
|
|||||||
@overload
|
@overload
|
||||||
def select(
|
def select(
|
||||||
*,
|
*,
|
||||||
cls: Type[RoleSelectT],
|
cls: Type[RoleSelectT] = RoleSelect[V],
|
||||||
options: List[SelectOption] = MISSING,
|
options: List[SelectOption] = MISSING,
|
||||||
channel_types: List[ChannelType] = ...,
|
channel_types: List[ChannelType] = ...,
|
||||||
placeholder: Optional[str] = ...,
|
placeholder: Optional[str] = ...,
|
||||||
@ -721,7 +721,7 @@ def select(
|
|||||||
@overload
|
@overload
|
||||||
def select(
|
def select(
|
||||||
*,
|
*,
|
||||||
cls: Type[ChannelSelectT],
|
cls: Type[ChannelSelectT] = ChannelSelect[V],
|
||||||
options: List[SelectOption] = MISSING,
|
options: List[SelectOption] = MISSING,
|
||||||
channel_types: List[ChannelType] = ...,
|
channel_types: List[ChannelType] = ...,
|
||||||
placeholder: Optional[str] = ...,
|
placeholder: Optional[str] = ...,
|
||||||
@ -737,7 +737,7 @@ def select(
|
|||||||
@overload
|
@overload
|
||||||
def select(
|
def select(
|
||||||
*,
|
*,
|
||||||
cls: Type[MentionableSelectT],
|
cls: Type[MentionableSelectT] = MentionableSelect[V],
|
||||||
options: List[SelectOption] = MISSING,
|
options: List[SelectOption] = MISSING,
|
||||||
channel_types: List[ChannelType] = MISSING,
|
channel_types: List[ChannelType] = MISSING,
|
||||||
placeholder: Optional[str] = ...,
|
placeholder: Optional[str] = ...,
|
||||||
@ -787,7 +787,7 @@ def select(
|
|||||||
|
|
||||||
.. versionchanged:: 2.1
|
.. versionchanged:: 2.1
|
||||||
Added the following keyword-arguments: ``cls``, ``channel_types``
|
Added the following keyword-arguments: ``cls``, ``channel_types``
|
||||||
|
|
||||||
Example
|
Example
|
||||||
---------
|
---------
|
||||||
.. code-block:: python3
|
.. code-block:: python3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user