|
@ -155,7 +155,7 @@ def _handle_commands( |
|
|
limit: Optional[int] = ..., |
|
|
limit: Optional[int] = ..., |
|
|
command_ids: Optional[List[int]] = ..., |
|
|
command_ids: Optional[List[int]] = ..., |
|
|
application: Optional[Snowflake] = ..., |
|
|
application: Optional[Snowflake] = ..., |
|
|
include_applications: bool = ..., |
|
|
with_applications: bool = ..., |
|
|
target: Optional[Snowflake] = ..., |
|
|
target: Optional[Snowflake] = ..., |
|
|
) -> AsyncIterator[SlashCommand]: |
|
|
) -> AsyncIterator[SlashCommand]: |
|
|
... |
|
|
... |
|
@ -170,7 +170,7 @@ def _handle_commands( |
|
|
limit: Optional[int] = ..., |
|
|
limit: Optional[int] = ..., |
|
|
command_ids: Optional[List[int]] = ..., |
|
|
command_ids: Optional[List[int]] = ..., |
|
|
application: Optional[Snowflake] = ..., |
|
|
application: Optional[Snowflake] = ..., |
|
|
include_applications: bool = ..., |
|
|
with_applications: bool = ..., |
|
|
target: Optional[Snowflake] = ..., |
|
|
target: Optional[Snowflake] = ..., |
|
|
) -> AsyncIterator[UserCommand]: |
|
|
) -> AsyncIterator[UserCommand]: |
|
|
... |
|
|
... |
|
@ -185,7 +185,7 @@ def _handle_commands( |
|
|
limit: Optional[int] = ..., |
|
|
limit: Optional[int] = ..., |
|
|
command_ids: Optional[List[int]] = ..., |
|
|
command_ids: Optional[List[int]] = ..., |
|
|
application: Optional[Snowflake] = ..., |
|
|
application: Optional[Snowflake] = ..., |
|
|
include_applications: bool = ..., |
|
|
with_applications: bool = ..., |
|
|
target: Optional[Snowflake] = ..., |
|
|
target: Optional[Snowflake] = ..., |
|
|
) -> AsyncIterator[MessageCommand]: |
|
|
) -> AsyncIterator[MessageCommand]: |
|
|
... |
|
|
... |
|
@ -199,7 +199,7 @@ async def _handle_commands( |
|
|
limit: Optional[int] = None, |
|
|
limit: Optional[int] = None, |
|
|
command_ids: Optional[List[int]] = None, |
|
|
command_ids: Optional[List[int]] = None, |
|
|
application: Optional[Snowflake] = None, |
|
|
application: Optional[Snowflake] = None, |
|
|
include_applications: bool = True, |
|
|
with_applications: bool = True, |
|
|
target: Optional[Snowflake] = None, |
|
|
target: Optional[Snowflake] = None, |
|
|
) -> AsyncIterator[BaseCommand]: |
|
|
) -> AsyncIterator[BaseCommand]: |
|
|
if limit is not None and limit < 0: |
|
|
if limit is not None and limit < 0: |
|
@ -240,7 +240,7 @@ async def _handle_commands( |
|
|
query=query if not command_ids and not application_id else None, |
|
|
query=query if not command_ids and not application_id else None, |
|
|
command_ids=command_ids if not application_id and not cursor else None, # type: ignore |
|
|
command_ids=command_ids if not application_id and not cursor else None, # type: ignore |
|
|
application_id=application_id, |
|
|
application_id=application_id, |
|
|
include_applications=include_applications if (not application_id or include_applications) else None, |
|
|
include_applications=with_applications if (not application_id or with_applications) else None, |
|
|
cursor=cursor, |
|
|
cursor=cursor, |
|
|
) |
|
|
) |
|
|
prev_cursor = cursor |
|
|
prev_cursor = cursor |
|
@ -1868,7 +1868,7 @@ class Messageable: |
|
|
limit: Optional[int] = None, |
|
|
limit: Optional[int] = None, |
|
|
command_ids: Optional[List[int]] = None, |
|
|
command_ids: Optional[List[int]] = None, |
|
|
application: Optional[Snowflake] = None, |
|
|
application: Optional[Snowflake] = None, |
|
|
include_applications: bool = True, |
|
|
with_applications: bool = True, |
|
|
) -> AsyncIterator[SlashCommand]: |
|
|
) -> AsyncIterator[SlashCommand]: |
|
|
"""Returns a :term:`asynchronous iterator` of the slash commands available in the channel. |
|
|
"""Returns a :term:`asynchronous iterator` of the slash commands available in the channel. |
|
|
|
|
|
|
|
@ -1905,7 +1905,7 @@ class Messageable: |
|
|
This means that the endpoint will return the found commands + up to ``limit`` more, if available. |
|
|
This means that the endpoint will return the found commands + up to ``limit`` more, if available. |
|
|
application: Optional[:class:`~discord.abc.Snowflake`] |
|
|
application: Optional[:class:`~discord.abc.Snowflake`] |
|
|
Whether to return this application's commands. Always set to DM recipient in a private channel context. |
|
|
Whether to return this application's commands. Always set to DM recipient in a private channel context. |
|
|
include_applications: :class:`bool` |
|
|
with_applications: :class:`bool` |
|
|
Whether to include applications in the response. Defaults to ``True``. |
|
|
Whether to include applications in the response. Defaults to ``True``. |
|
|
|
|
|
|
|
|
Raises |
|
|
Raises |
|
@ -1934,7 +1934,7 @@ class Messageable: |
|
|
limit=limit, |
|
|
limit=limit, |
|
|
command_ids=command_ids, |
|
|
command_ids=command_ids, |
|
|
application=application, |
|
|
application=application, |
|
|
include_applications=include_applications, |
|
|
with_applications=with_applications, |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
def user_commands( |
|
|
def user_commands( |
|
@ -1944,7 +1944,7 @@ class Messageable: |
|
|
limit: Optional[int] = None, |
|
|
limit: Optional[int] = None, |
|
|
command_ids: Optional[List[int]] = None, |
|
|
command_ids: Optional[List[int]] = None, |
|
|
application: Optional[Snowflake] = None, |
|
|
application: Optional[Snowflake] = None, |
|
|
include_applications: bool = True, |
|
|
with_applications: bool = True, |
|
|
) -> AsyncIterator[UserCommand]: |
|
|
) -> AsyncIterator[UserCommand]: |
|
|
"""Returns a :term:`asynchronous iterator` of the user commands available to use on the user. |
|
|
"""Returns a :term:`asynchronous iterator` of the user commands available to use on the user. |
|
|
|
|
|
|
|
@ -1981,7 +1981,7 @@ class Messageable: |
|
|
This means that the endpoint will return the found commands + up to ``limit`` more, if available. |
|
|
This means that the endpoint will return the found commands + up to ``limit`` more, if available. |
|
|
application: Optional[:class:`~discord.abc.Snowflake`] |
|
|
application: Optional[:class:`~discord.abc.Snowflake`] |
|
|
Whether to return this application's commands. Always set to DM recipient in a private channel context. |
|
|
Whether to return this application's commands. Always set to DM recipient in a private channel context. |
|
|
include_applications: :class:`bool` |
|
|
with_applications: :class:`bool` |
|
|
Whether to include applications in the response. Defaults to ``True``. |
|
|
Whether to include applications in the response. Defaults to ``True``. |
|
|
|
|
|
|
|
|
Raises |
|
|
Raises |
|
@ -2010,7 +2010,7 @@ class Messageable: |
|
|
limit=limit, |
|
|
limit=limit, |
|
|
command_ids=command_ids, |
|
|
command_ids=command_ids, |
|
|
application=application, |
|
|
application=application, |
|
|
include_applications=include_applications, |
|
|
with_applications=with_applications, |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|