diff options
| author | Rapptz <[email protected]> | 2021-05-04 10:42:13 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-06-08 07:26:22 -0400 |
| commit | 5a72391b7261dd876dc0fbdb1f3c92cccd0cf0c6 (patch) | |
| tree | 957cec8c51287a2f090512e776b8ff468afbfec2 /discord/permissions.py | |
| parent | Add TextChannel.get_thread shortcut helper (diff) | |
| download | discord.py-5a72391b7261dd876dc0fbdb1f3c92cccd0cf0c6.tar.xz discord.py-5a72391b7261dd876dc0fbdb1f3c92cccd0cf0c6.zip | |
Add thread related permissions
Diffstat (limited to 'discord/permissions.py')
| -rw-r--r-- | discord/permissions.py | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/discord/permissions.py b/discord/permissions.py index ad78f3b9..442f93fc 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -140,7 +140,7 @@ class Permissions(BaseFlags): """A factory method that creates a :class:`Permissions` with all permissions set to ``True``. """ - return cls(0b111111111111111111111111111111111) + return cls(0b111111111111111111111111111111111111) @classmethod def all_channel(cls): @@ -479,6 +479,31 @@ class Permissions(BaseFlags): """ return 1 << 33 + @flag_value + def manage_threads(self): + """:class:`bool`: Returns ``True`` if a user can manage threads. + + .. versionadded:: 2.0 + """ + return 1 << 34 + + @flag_value + def use_threads(self): + """:class:`bool`: Returns ``True`` if a user can create and participate in public threads. + + .. versionadded:: 2.0 + """ + return 1 << 35 + + @flag_value + def use_private_threads(self): + """:class:`bool`: Returns ``True`` if a user can create and participate in private threads. + + .. versionadded:: 2.0 + """ + return 1 << 36 + + def augment_from_permissions(cls): cls.VALID_NAMES = set(Permissions.VALID_FLAGS) aliases = set() |