mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-07 10:22:59 +00:00
[commands] Add Context.permissions and Context.bot_permissions
This commit is contained in:
@ -186,6 +186,14 @@ class Permissions(BaseFlags):
|
||||
p.read_message_history = False
|
||||
return ~p.value
|
||||
|
||||
@classmethod
|
||||
def _dm_permissions(cls) -> Self:
|
||||
base = cls.text()
|
||||
base.read_messages = True
|
||||
base.send_tts_messages = False
|
||||
base.manage_messages = False
|
||||
return base
|
||||
|
||||
@classmethod
|
||||
def all_channel(cls) -> Self:
|
||||
"""A :class:`Permissions` with all channel-specific permissions set to
|
||||
|
Reference in New Issue
Block a user