aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorz03h <[email protected]>2021-08-17 21:46:30 -0700
committerGitHub <[email protected]>2021-08-18 00:46:30 -0400
commit27debe18ca77b4143a12f980b708fa938ea2e9ec (patch)
tree2e57944596d7dd5b9ee9462b0b5f711d0ca10b46
parentFix Guild.fetch_channel not working for threads (diff)
downloaddiscord.py-27debe18ca77b4143a12f980b708fa938ea2e9ec.tar.xz
discord.py-27debe18ca77b4143a12f980b708fa938ea2e9ec.zip
Update Permissions classmethods to include thread/stage/sticker
-rw-r--r--discord/permissions.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/discord/permissions.py b/discord/permissions.py
index 04c475fa..13c3fd8c 100644
--- a/discord/permissions.py
+++ b/discord/permissions.py
@@ -147,7 +147,7 @@ class Permissions(BaseFlags):
"""A factory method that creates a :class:`Permissions` with all
permissions set to ``True``.
"""
- return cls(0b111111111111111111111111111111111111)
+ return cls(0b11111111111111111111111111111111111111)
@classmethod
def all_channel(cls: Type[P]) -> P:
@@ -167,8 +167,12 @@ class Permissions(BaseFlags):
.. versionchanged:: 1.7
Added :attr:`stream`, :attr:`priority_speaker` and :attr:`use_slash_commands` permissions.
+
+ .. versionchanged:: 2.0
+ Added :attr:`use_threads`, :attr:`use_private_threads`, :attr:`manage_threads`,
+ :attr:`use_external_stickers` and :attr:`request_to_speak` permissions.
"""
- return cls(0b10110011111101111111111101010001)
+ return cls(0b11110110110011111101111111111101010001)
@classmethod
def general(cls: Type[P]) -> P:
@@ -200,8 +204,12 @@ class Permissions(BaseFlags):
.. versionchanged:: 1.7
Permission :attr:`read_messages` is no longer part of the text permissions.
Added :attr:`use_slash_commands` permission.
+
+ .. versionchanged:: 2.0
+ Added :attr:`use_threads`, :attr:`use_private_threads`, :attr:`manage_threads`
+ and :attr:`use_external_stickers` permissions.
"""
- return cls(0b10000000000001111111100001000000)
+ return cls(0b11110010000000000001111111100001000000)
@classmethod
def voice(cls: Type[P]) -> P: