From 515209236a06a3d684e40f313b57092b523c9c9e Mon Sep 17 00:00:00 2001 From: dolfies Date: Wed, 5 Apr 2023 19:14:54 -0400 Subject: [PATCH] Remove unnecessary versionadded directives --- discord/channel.py | 19 ++++--------------- discord/flags.py | 6 +----- discord/http.py | 11 ++++++++++- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/discord/channel.py b/discord/channel.py index 9bcedb553..9fddb5e92 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -2240,8 +2240,6 @@ class ForumChannel(discord.abc.GuildChannel, Hashable): This does not always retrieve archived threads, as they are not retained in the internal cache. Use :func:`Guild.fetch_channel` instead. - .. versionadded:: 2.0 - Parameters ----------- thread_id: :class:`int` @@ -2264,25 +2262,17 @@ class ForumChannel(discord.abc.GuildChannel, Hashable): @property def flags(self) -> ChannelFlags: - """:class:`ChannelFlags`: The flags associated with this thread. - - .. versionadded:: 2.0 - """ + """:class:`ChannelFlags`: The flags associated with this forum.""" return ChannelFlags._from_value(self._flags) @property def available_tags(self) -> Sequence[ForumTag]: - """Sequence[:class:`ForumTag`]: Returns all the available tags for this forum. - - .. versionadded:: 2.0 - """ + """Sequence[:class:`ForumTag`]: Returns all the available tags for this forum.""" return utils.SequenceProxy(self._available_tags.values()) def get_tag(self, tag_id: int, /) -> Optional[ForumTag]: """Returns the tag with the given ID. - .. versionadded:: 2.0 - Parameters ---------- tag_id: :class:`int` @@ -2720,8 +2710,6 @@ class ForumChannel(discord.abc.GuildChannel, Hashable): You must have :attr:`~Permissions.read_message_history` to do this. - .. versionadded:: 2.0 - Parameters ----------- limit: Optional[:class:`bool`] @@ -3367,7 +3355,8 @@ class GroupChannel(discord.abc.Messageable, discord.abc.Connectable, discord.abc .. versionchanged:: 2.0 - Thread related permissions are now set to ``False``. + Thread related permissions are now set to ``False``, + and managed channel permissions are taken into account. Parameters ----------- diff --git a/discord/flags.py b/discord/flags.py index 84cb3337d..16314f671 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -1349,11 +1349,7 @@ class ChannelFlags(BaseFlags): @flag_value def require_tag(self): - """:class:`bool`: Returns ``True`` if a tag is required to be specified when creating a thread - in a :class:`ForumChannel`. - - .. versionadded:: 2.0 - """ + """:class:`bool`: Returns ``True`` if a tag is required to be specified when creating a thread in a :class:`ForumChannel`.""" return 1 << 4 diff --git a/discord/http.py b/discord/http.py index d34510591..c0b30272b 100644 --- a/discord/http.py +++ b/discord/http.py @@ -53,7 +53,16 @@ import datetime import aiohttp from .enums import RelationshipAction, InviteType -from .errors import HTTPException, RateLimited, Forbidden, NotFound, LoginFailure, DiscordServerError, GatewayNotFound, CaptchaRequired +from .errors import ( + HTTPException, + RateLimited, + Forbidden, + NotFound, + LoginFailure, + DiscordServerError, + GatewayNotFound, + CaptchaRequired, +) from .file import File from .tracking import ContextProperties from . import utils