|
@ -2820,11 +2820,19 @@ class DMChannel(discord.abc.Messageable, discord.abc.Connectable, discord.abc.Pr |
|
|
|
|
|
|
|
|
- :attr:`~Permissions.send_tts_messages`: You cannot send TTS messages in a DM. |
|
|
- :attr:`~Permissions.send_tts_messages`: You cannot send TTS messages in a DM. |
|
|
- :attr:`~Permissions.manage_messages`: You cannot delete others messages in a DM. |
|
|
- :attr:`~Permissions.manage_messages`: You cannot delete others messages in a DM. |
|
|
|
|
|
- :attr:`~Permissions.create_private_threads`: There are no threads in a DM. |
|
|
|
|
|
- :attr:`~Permissions.create_public_threads`: There are no threads in a DM. |
|
|
|
|
|
- :attr:`~Permissions.manage_threads`: There are no threads in a DM. |
|
|
|
|
|
- :attr:`~Permissions.send_messages_in_threads`: There are no threads in a DM. |
|
|
|
|
|
|
|
|
.. versionchanged:: 2.0 |
|
|
.. versionchanged:: 2.0 |
|
|
|
|
|
|
|
|
``obj`` parameter is now positional-only. |
|
|
``obj`` parameter is now positional-only. |
|
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 2.0 |
|
|
|
|
|
|
|
|
|
|
|
Thread related permissions are now set to ``False``. |
|
|
|
|
|
|
|
|
Parameters |
|
|
Parameters |
|
|
----------- |
|
|
----------- |
|
|
obj: :class:`~discord.abc.Snowflake` |
|
|
obj: :class:`~discord.abc.Snowflake` |
|
@ -2836,12 +2844,7 @@ class DMChannel(discord.abc.Messageable, discord.abc.Connectable, discord.abc.Pr |
|
|
:class:`Permissions` |
|
|
:class:`Permissions` |
|
|
The resolved permissions. |
|
|
The resolved permissions. |
|
|
""" |
|
|
""" |
|
|
|
|
|
return Permissions._dm_permissions() |
|
|
base = Permissions.text() |
|
|
|
|
|
base.read_messages = True |
|
|
|
|
|
base.send_tts_messages = False |
|
|
|
|
|
base.manage_messages = False |
|
|
|
|
|
return base |
|
|
|
|
|
|
|
|
|
|
|
def get_partial_message(self, message_id: int, /) -> PartialMessage: |
|
|
def get_partial_message(self, message_id: int, /) -> PartialMessage: |
|
|
"""Creates a :class:`PartialMessage` from the message ID. |
|
|
"""Creates a :class:`PartialMessage` from the message ID. |
|
@ -3181,6 +3184,10 @@ class GroupChannel(discord.abc.Messageable, discord.abc.Connectable, discord.abc |
|
|
|
|
|
|
|
|
- :attr:`~Permissions.send_tts_messages`: You cannot send TTS messages in a DM. |
|
|
- :attr:`~Permissions.send_tts_messages`: You cannot send TTS messages in a DM. |
|
|
- :attr:`~Permissions.manage_messages`: You cannot delete others messages in a DM. |
|
|
- :attr:`~Permissions.manage_messages`: You cannot delete others messages in a DM. |
|
|
|
|
|
- :attr:`~Permissions.create_private_threads`: There are no threads in a DM. |
|
|
|
|
|
- :attr:`~Permissions.create_public_threads`: There are no threads in a DM. |
|
|
|
|
|
- :attr:`~Permissions.manage_threads`: There are no threads in a DM. |
|
|
|
|
|
- :attr:`~Permissions.send_messages_in_threads`: There are no threads in a DM. |
|
|
|
|
|
|
|
|
This also checks the kick_members permission if the user is the owner. |
|
|
This also checks the kick_members permission if the user is the owner. |
|
|
|
|
|
|
|
@ -3188,6 +3195,10 @@ class GroupChannel(discord.abc.Messageable, discord.abc.Connectable, discord.abc |
|
|
|
|
|
|
|
|
``obj`` parameter is now positional-only. |
|
|
``obj`` parameter is now positional-only. |
|
|
|
|
|
|
|
|
|
|
|
.. versionchanged:: 2.0 |
|
|
|
|
|
|
|
|
|
|
|
Thread related permissions are now set to ``False``. |
|
|
|
|
|
|
|
|
Parameters |
|
|
Parameters |
|
|
----------- |
|
|
----------- |
|
|
obj: :class:`~discord.abc.Snowflake` |
|
|
obj: :class:`~discord.abc.Snowflake` |
|
@ -3199,10 +3210,7 @@ class GroupChannel(discord.abc.Messageable, discord.abc.Connectable, discord.abc |
|
|
The resolved permissions for the user. |
|
|
The resolved permissions for the user. |
|
|
""" |
|
|
""" |
|
|
if obj.id in [x.id for x in self.recipients]: |
|
|
if obj.id in [x.id for x in self.recipients]: |
|
|
base = Permissions.text() |
|
|
base = Permissions._dm_permissions() |
|
|
base.read_messages = True |
|
|
|
|
|
base.send_tts_messages = False |
|
|
|
|
|
base.manage_messages = False |
|
|
|
|
|
base.mention_everyone = True |
|
|
base.mention_everyone = True |
|
|
if not self.managed: |
|
|
if not self.managed: |
|
|
base.create_instant_invite = True |
|
|
base.create_instant_invite = True |
|
|