Browse Source

Remove unnecessary versionadded directives

pull/10109/head
dolfies 2 years ago
parent
commit
515209236a
  1. 19
      discord/channel.py
  2. 6
      discord/flags.py
  3. 11
      discord/http.py

19
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
-----------

6
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

11
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

Loading…
Cancel
Save