mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 07:26:17 +00:00
Add Permissions.elevated()
This commit is contained in:
parent
30cc00c9a4
commit
723584ca19
@ -252,6 +252,27 @@ class Permissions(BaseFlags):
|
|||||||
"""
|
"""
|
||||||
return cls(0b1010000000000000000010000)
|
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
|
@classmethod
|
||||||
def advanced(cls) -> Self:
|
def advanced(cls) -> Self:
|
||||||
"""A factory method that creates a :class:`Permissions` with all
|
"""A factory method that creates a :class:`Permissions` with all
|
||||||
|
Loading…
x
Reference in New Issue
Block a user