Fix permissions-based docstrings to be more consistent

This commit is contained in:
Steve C
2022-09-17 14:07:39 -04:00
committed by GitHub
parent a53b609e37
commit ce06beeb6c
19 changed files with 104 additions and 155 deletions

View File

@ -310,8 +310,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
Edits the channel.
You must have the :attr:`~Permissions.manage_channels` permission to
use this.
You must have :attr:`~Permissions.manage_channels` to do this.
.. versionchanged:: 1.3
The ``overwrites`` keyword-only parameter was added.
@ -402,8 +401,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
You cannot bulk delete more than 100 messages or messages that
are older than 14 days old.
You must have the :attr:`~Permissions.manage_messages` permission to
use this.
You must have :attr:`~Permissions.manage_messages` to do this.
.. versionchanged:: 2.0
@ -464,9 +462,9 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
``check``. If a ``check`` is not provided then all messages are deleted
without discrimination.
You must have the :attr:`~Permissions.manage_messages` permission to
You must have :attr:`~Permissions.manage_messages` to
delete messages even if they are your own.
The :attr:`~Permissions.read_message_history` permission is
Having :attr:`~Permissions.read_message_history` is
also needed to retrieve message history.
.. versionchanged:: 2.0
@ -536,7 +534,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
Gets the list of webhooks from this channel.
Requires :attr:`~.Permissions.manage_webhooks` permissions.
You must have :attr:`~.Permissions.manage_webhooks` to do this.
Raises
-------
@ -559,7 +557,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
Creates a webhook for this channel.
Requires :attr:`~.Permissions.manage_webhooks` permissions.
You must have :attr:`~.Permissions.manage_webhooks` to do this.
.. versionchanged:: 1.1
Added the ``reason`` keyword-only parameter.
@ -792,7 +790,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
"""Returns an :term:`asynchronous iterator` that iterates over all archived threads in this text channel,
in order of decreasing ID for joined threads, and decreasing :attr:`Thread.archive_timestamp` otherwise.
You must have :attr:`~Permissions.read_message_history` to use this. If iterating over private threads
You must have :attr:`~Permissions.read_message_history` to do this. If iterating over private threads
then :attr:`~Permissions.manage_threads` is also required.
.. versionadded:: 2.0
@ -1132,8 +1130,7 @@ class VoiceChannel(discord.abc.Messageable, VocalGuildChannel):
You cannot bulk delete more than 100 messages or messages that
are older than 14 days old.
You must have the :attr:`~Permissions.manage_messages` permission to
use this.
You must have :attr:`~Permissions.manage_messages` to do this.
.. versionadded:: 2.0
@ -1190,9 +1187,9 @@ class VoiceChannel(discord.abc.Messageable, VocalGuildChannel):
``check``. If a ``check`` is not provided then all messages are deleted
without discrimination.
You must have the :attr:`~Permissions.manage_messages` permission to
You must have :attr:`~Permissions.manage_messages` to
delete messages even if they are your own.
The :attr:`~Permissions.read_message_history` permission is
Having :attr:`~Permissions.read_message_history` is
also needed to retrieve message history.
.. versionadded:: 2.0
@ -1261,7 +1258,7 @@ class VoiceChannel(discord.abc.Messageable, VocalGuildChannel):
Gets the list of webhooks from this channel.
Requires :attr:`~.Permissions.manage_webhooks` permissions.
You must have :attr:`~.Permissions.manage_webhooks` to do this.
.. versionadded:: 2.0
@ -1286,7 +1283,7 @@ class VoiceChannel(discord.abc.Messageable, VocalGuildChannel):
Creates a webhook for this channel.
Requires :attr:`~.Permissions.manage_webhooks` permissions.
You must have :attr:`~.Permissions.manage_webhooks` to do this.
.. versionadded:: 2.0
@ -1356,8 +1353,7 @@ class VoiceChannel(discord.abc.Messageable, VocalGuildChannel):
Edits the channel.
You must have the :attr:`~Permissions.manage_channels` permission to
use this.
You must have :attr:`~Permissions.manage_channels` to do this.
.. versionchanged:: 1.3
The ``overwrites`` keyword-only parameter was added.
@ -1565,8 +1561,7 @@ class StageChannel(VocalGuildChannel):
Create a stage instance.
You must have the :attr:`~Permissions.manage_channels` permission to
use this.
You must have :attr:`~Permissions.manage_channels` to do this.
.. versionadded:: 2.0
@ -1656,8 +1651,7 @@ class StageChannel(VocalGuildChannel):
Edits the channel.
You must have the :attr:`~Permissions.manage_channels` permission to
use this.
You must have :attr:`~Permissions.manage_channels` to do this.
.. versionchanged:: 2.0
The ``topic`` parameter must now be set via :attr:`create_instance`.
@ -1827,8 +1821,7 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable):
Edits the channel.
You must have the :attr:`~Permissions.manage_channels` permission to
use this.
You must have :attr:`~Permissions.manage_channels` to do this.
.. versionchanged:: 1.3
The ``overwrites`` keyword-only parameter was added.
@ -2293,8 +2286,7 @@ class ForumChannel(discord.abc.GuildChannel, Hashable):
Edits the forum.
You must have the :attr:`~Permissions.manage_channels` permission to
use this.
You must have :attr:`~Permissions.manage_channels` to do this.
Parameters
----------
@ -2407,8 +2399,7 @@ class ForumChannel(discord.abc.GuildChannel, Hashable):
Creates a new tag in this forum.
You must have the :attr:`~Permissions.manage_channels` permission to
use this.
You must have :attr:`~Permissions.manage_channels` to do this.
Parameters
----------
@ -2596,7 +2587,7 @@ class ForumChannel(discord.abc.GuildChannel, Hashable):
Gets the list of webhooks from this channel.
Requires :attr:`~.Permissions.manage_webhooks` permissions.
You must have :attr:`~.Permissions.manage_webhooks` to do this.
Raises
-------
@ -2619,7 +2610,7 @@ class ForumChannel(discord.abc.GuildChannel, Hashable):
Creates a webhook for this channel.
Requires :attr:`~.Permissions.manage_webhooks` permissions.
You must have :attr:`~.Permissions.manage_webhooks` to do this.
Parameters
-------------