Browse Source

Add Permissions.elevated()

pull/7859/head
Narmy 3 years ago
committed by GitHub
parent
commit
723584ca19
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      discord/permissions.py

21
discord/permissions.py

@ -252,6 +252,27 @@ class Permissions(BaseFlags):
"""
return cls(0b1010000000000000000010000)
@classmethod
def elevated(cls) -> Self:
"""A factory method that creates a :class:`Permissions` with all permissions
that require 2FA set to ``True``. These permissions are currently:
- :attr:`kick_members`
- :attr:`ban_members`
- :attr:`administrator`
- :attr:`manage_channels`
- :attr:`manage_guild`
- :attr:`manage_messages`
- :attr:`manage_roles`
- :attr:`manage_webhooks`
- :attr:`manage_emojis_and_stickers`
- :attr:`manage_threads`
- :attr:`moderate_members`
.. versionadded:: 2.0
"""
return cls(0b10000010001110000000000000010000000111110)
@classmethod
def advanced(cls) -> Self:
"""A factory method that creates a :class:`Permissions` with all

Loading…
Cancel
Save