From 20a7961e1918c250f3c6a4d328ae82f6deddb6ee Mon Sep 17 00:00:00 2001 From: invalid-user <77624311+rperson1508@users.noreply.github.com> Date: Sat, 30 Apr 2022 18:53:29 +0800 Subject: [PATCH] Rename use_slash_commands to use_application_commands Co-authored-by: Danny --- discord/permissions.py | 8 ++++---- docs/migrating.rst | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/discord/permissions.py b/discord/permissions.py index d018e9ab9..3d96a1d9a 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -175,7 +175,7 @@ class Permissions(BaseFlags): - :attr:`administrator` .. versionchanged:: 1.7 - Added :attr:`stream`, :attr:`priority_speaker` and :attr:`use_slash_commands` permissions. + Added :attr:`stream`, :attr:`priority_speaker` and :attr:`use_application_commands` permissions. .. versionchanged:: 2.0 Added :attr:`create_public_threads`, :attr:`create_private_threads`, :attr:`manage_threads`, @@ -213,7 +213,7 @@ class Permissions(BaseFlags): .. versionchanged:: 1.7 Permission :attr:`read_messages` is no longer part of the text permissions. - Added :attr:`use_slash_commands` permission. + Added :attr:`use_application_commands` permission. .. versionchanged:: 2.0 Added :attr:`create_public_threads`, :attr:`create_private_threads`, :attr:`manage_threads`, @@ -517,7 +517,7 @@ class Permissions(BaseFlags): return 1 << 30 @flag_value - def use_slash_commands(self) -> int: + def use_application_commands(self) -> int: """:class:`bool`: Returns ``True`` if a user can use slash commands. .. versionadded:: 1.7 @@ -707,7 +707,7 @@ class PermissionOverwrite: manage_webhooks: Optional[bool] manage_emojis: Optional[bool] manage_emojis_and_stickers: Optional[bool] - use_slash_commands: Optional[bool] + use_application_commands: Optional[bool] request_to_speak: Optional[bool] manage_events: Optional[bool] manage_threads: Optional[bool] diff --git a/docs/migrating.rst b/docs/migrating.rst index 8912092bb..0192b60b0 100644 --- a/docs/migrating.rst +++ b/docs/migrating.rst @@ -1095,6 +1095,9 @@ The following deprecated functionality have been removed: - Use ``chunk_guild_at_startup`` instead. +- ``Permissions.use_slash_commands`` and ``PermissionOverwrite.use_slash_commands`` + - Use :attr:`Permissions.use_application_commands` and ``PermissionOverwrite.use_application_commands`` instead. + The following have been removed: - ``MemberCacheFlags.online``