mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
Set thread related perms in private channels to False
This commit is contained in:
parent
217662ca44
commit
6725f329b2
@ -2812,11 +2812,19 @@ class DMChannel(discord.abc.Messageable, discord.abc.PrivateChannel, Hashable):
|
||||
|
||||
- :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.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
|
||||
|
||||
``obj`` parameter is now positional-only.
|
||||
|
||||
.. versionchanged:: 2.1
|
||||
|
||||
Thread related permissions are now set to ``False``.
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
obj: :class:`User`
|
||||
@ -2978,6 +2986,10 @@ class GroupChannel(discord.abc.Messageable, discord.abc.PrivateChannel, Hashable
|
||||
|
||||
- :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.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.
|
||||
|
||||
@ -2985,6 +2997,10 @@ class GroupChannel(discord.abc.Messageable, discord.abc.PrivateChannel, Hashable
|
||||
|
||||
``obj`` parameter is now positional-only.
|
||||
|
||||
.. versionchanged:: 2.1
|
||||
|
||||
Thread related permissions are now set to ``False``.
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
obj: :class:`~discord.abc.Snowflake`
|
||||
|
@ -192,6 +192,10 @@ class Permissions(BaseFlags):
|
||||
base.read_messages = True
|
||||
base.send_tts_messages = False
|
||||
base.manage_messages = False
|
||||
base.create_private_threads = False
|
||||
base.create_public_threads = False
|
||||
base.manage_threads = False
|
||||
base.send_messages_in_threads = False
|
||||
return base
|
||||
|
||||
@classmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user