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 This does not always retrieve archived threads, as they are not retained in the internal
cache. Use :func:`Guild.fetch_channel` instead. cache. Use :func:`Guild.fetch_channel` instead.
.. versionadded:: 2.0
Parameters Parameters
----------- -----------
thread_id: :class:`int` thread_id: :class:`int`
@ -2264,25 +2262,17 @@ class ForumChannel(discord.abc.GuildChannel, Hashable):
@property @property
def flags(self) -> ChannelFlags: def flags(self) -> ChannelFlags:
""":class:`ChannelFlags`: The flags associated with this thread. """:class:`ChannelFlags`: The flags associated with this forum."""
.. versionadded:: 2.0
"""
return ChannelFlags._from_value(self._flags) return ChannelFlags._from_value(self._flags)
@property @property
def available_tags(self) -> Sequence[ForumTag]: def available_tags(self) -> Sequence[ForumTag]:
"""Sequence[:class:`ForumTag`]: Returns all the available tags for this forum. """Sequence[:class:`ForumTag`]: Returns all the available tags for this forum."""
.. versionadded:: 2.0
"""
return utils.SequenceProxy(self._available_tags.values()) return utils.SequenceProxy(self._available_tags.values())
def get_tag(self, tag_id: int, /) -> Optional[ForumTag]: def get_tag(self, tag_id: int, /) -> Optional[ForumTag]:
"""Returns the tag with the given ID. """Returns the tag with the given ID.
.. versionadded:: 2.0
Parameters Parameters
---------- ----------
tag_id: :class:`int` 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. You must have :attr:`~Permissions.read_message_history` to do this.
.. versionadded:: 2.0
Parameters Parameters
----------- -----------
limit: Optional[:class:`bool`] limit: Optional[:class:`bool`]
@ -3367,7 +3355,8 @@ class GroupChannel(discord.abc.Messageable, discord.abc.Connectable, discord.abc
.. versionchanged:: 2.0 .. 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 Parameters
----------- -----------

6
discord/flags.py

@ -1349,11 +1349,7 @@ class ChannelFlags(BaseFlags):
@flag_value @flag_value
def require_tag(self): def require_tag(self):
""":class:`bool`: Returns ``True`` if a tag is required to be specified when creating a thread """:class:`bool`: Returns ``True`` if a tag is required to be specified when creating a thread in a :class:`ForumChannel`."""
in a :class:`ForumChannel`.
.. versionadded:: 2.0
"""
return 1 << 4 return 1 << 4

11
discord/http.py

@ -53,7 +53,16 @@ import datetime
import aiohttp import aiohttp
from .enums import RelationshipAction, InviteType 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 .file import File
from .tracking import ContextProperties from .tracking import ContextProperties
from . import utils from . import utils

Loading…
Cancel
Save