Skip to content

Commit

Permalink
Fix version directives
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfies committed Dec 4, 2024
1 parent a7f93d4 commit 008a959
Show file tree
Hide file tree
Showing 17 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion discord/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,7 @@ async def send(
poll: :class:`~discord.Poll`
The poll to send with this message.
.. versionadded:: 2.4
.. versionadded:: 2.1
Raises
--------
Expand Down
6 changes: 3 additions & 3 deletions discord/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class Activity(BaseActivity):
platform: Optional[:class:`str`]
The user's current platform.
.. versionadded:: 2.4
.. versionadded:: 2.1
timestamps: :class:`dict`
A dictionary of timestamps. It contains the following optional keys:
Expand Down Expand Up @@ -382,7 +382,7 @@ class Game(BaseActivity):
platform: Optional[:class:`str`]
Where the user is playing from (ie. PS5, Xbox).
.. versionadded:: 2.4
.. versionadded:: 2.1
assets: :class:`dict`
A dictionary representing the images and their hover text of a game.
Expand All @@ -393,7 +393,7 @@ class Game(BaseActivity):
- ``small_image``: A string representing the ID for the small image asset.
- ``small_text``: A string representing the text when hovering over the small image asset.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""

__slots__ = ('name', '_end', '_start', 'platform', 'assets')
Expand Down
2 changes: 1 addition & 1 deletion discord/automod.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class AutoModTrigger:
mention_raid_protection: :class:`bool`
Whether mention raid protection is enabled or not.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""

__slots__ = (
Expand Down
4 changes: 2 additions & 2 deletions discord/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ async def edit(self, *, reason: Optional[str] = None, **options: Any) -> Optiona
The new voice channel status. It can be up to 500 characters.
Can be ``None`` to remove the status.
.. versionadded:: 2.4
.. versionadded:: 2.1
Raises
------
Expand Down Expand Up @@ -2652,7 +2652,7 @@ def is_nsfw(self) -> bool:
def is_media(self) -> bool:
""":class:`bool`: Checks if the channel is a media channel.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return self._type == ChannelType.media.value

Expand Down
4 changes: 2 additions & 2 deletions discord/ext/commands/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class Flag:
positional: :class:`bool`
Whether the flag is positional or not. There can only be one positional flag.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""

name: str = MISSING
Expand Down Expand Up @@ -143,7 +143,7 @@ class attributes.
positional: :class:`bool`
Whether the flag is positional or not. There can only be one positional flag.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return Flag(
name=name,
Expand Down
4 changes: 2 additions & 2 deletions discord/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,7 @@ def hide_media_download_options(self):
""":class:`bool`: Returns ``True`` if the client hides embedded media download options in a :class:`ForumChannel`.
Only available in media channels.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return 1 << 15

Expand Down Expand Up @@ -2750,7 +2750,7 @@ def remix(self):
class RoleFlags(BaseFlags):
r"""Wraps up the Discord Role flags
.. versionadded:: 2.4
.. versionadded:: 2.1
.. container:: operations
Expand Down
14 changes: 7 additions & 7 deletions discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -2310,13 +2310,13 @@ async def edit(
The time when invites should be enabled again, or ``None`` to disable the action.
This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.
.. versionadded:: 2.4
.. versionadded:: 2.1
dms_disabled_until: Optional[:class:`datetime.datetime`]
The time when direct messages should be allowed again, or ``None`` to disable the action.
This must be a timezone-aware datetime object. Consider using :func:`utils.utcnow`.
.. versionadded:: 2.4
.. versionadded:: 2.1
Raises
-------
Expand Down Expand Up @@ -4383,7 +4383,7 @@ async def bulk_ban(
You must have :attr:`~Permissions.ban_members` and :attr:`~Permissions.manage_guild` to do this.
.. versionadded:: 2.4
.. versionadded:: 2.1
Parameters
-----------
Expand Down Expand Up @@ -5555,7 +5555,7 @@ def invites_paused_until(self) -> Optional[datetime]:
"""Optional[:class:`datetime.datetime`]: If invites are paused, returns when
invites will get enabled in UTC, otherwise returns None.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
if not self._incidents_data:
return None
Expand All @@ -5567,7 +5567,7 @@ def dms_paused_until(self) -> Optional[datetime]:
"""Optional[:class:`datetime.datetime`]: If DMs are paused, returns when DMs
will get enabled in UTC, otherwise returns None.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
if not self._incidents_data:
return None
Expand Down Expand Up @@ -5599,7 +5599,7 @@ def raid_detected_at(self) -> Optional[datetime.datetime]:
def invites_paused(self) -> bool:
""":class:`bool`: Whether invites are paused in the guild.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
if not self.invites_paused_until:
return 'INVITES_DISABLED' in self.features
Expand All @@ -5609,7 +5609,7 @@ def invites_paused(self) -> bool:
def dms_paused(self) -> bool:
""":class:`bool`: Whether DMs are paused in the guild.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
if not self.dms_paused_until:
return False
Expand Down
8 changes: 4 additions & 4 deletions discord/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ def thread(self) -> Optional[Thread]:
This does not retrieve archived threads, as they are not retained in the internal
cache. Use :meth:`fetch_thread` instead.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
if self.guild is not None:
return self.guild.get_thread(self.id)
Expand Down Expand Up @@ -1452,7 +1452,7 @@ async def fetch_thread(self) -> Thread:
This method is an API call. For general usage, consider :attr:`thread` instead.
.. versionadded:: 2.4
.. versionadded:: 2.1
Raises
-------
Expand Down Expand Up @@ -1858,7 +1858,7 @@ class Message(PartialMessage, Hashable):
poll: Optional[:class:`Poll`]
The poll attached to this message.
.. versionadded:: 2.4
.. versionadded:: 2.1
purchase_notification: Optional[:class:`PurchaseNotification`]
The data of the purchase notification that prompted this :attr:`MessageType.purchase_notification` message.
Expand Down Expand Up @@ -2393,7 +2393,7 @@ def thread(self) -> Optional[Thread]:
For messages received via the gateway this does not retrieve archived threads, as they
are not retained in the internal cache. Use :meth:`fetch_thread` instead.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
if self.guild is not None:
# Fall back to guild threads in case one was created after the message
Expand Down
12 changes: 6 additions & 6 deletions discord/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def events(cls) -> Self:
"""A factory method that creates a :class:`Permissions` with all
"Events" permissions from the official Discord UI set to ``True``.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return cls(0b0000_0000_0000_0000_0001_0000_0000_0010_0000_0000_0000_0000_0000_0000_0000_0000)

Expand Down Expand Up @@ -702,7 +702,7 @@ def moderate_members(self) -> int:
def view_creator_monetization_analytics(self) -> int:
""":class:`bool`: Returns ``True`` if a user can view role subscription insights.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return 1 << 41

Expand All @@ -726,7 +726,7 @@ def create_expressions(self) -> int:
def create_events(self) -> int:
""":class:`bool`: Returns ``True`` if a user can create guild events.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return 1 << 44

Expand All @@ -750,23 +750,23 @@ def send_voice_messages(self) -> int:
def send_polls(self) -> int:
""":class:`bool`: Returns ``True`` if a user can send poll messages.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return 1 << 49

@make_permission_alias('send_polls')
def create_polls(self) -> int:
""":class:`bool`: An alias for :attr:`send_polls`.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return 1 << 49

@flag_value
def use_external_apps(self) -> int:
""":class:`bool`: Returns ``True`` if a user can use external apps.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return 1 << 50

Expand Down
6 changes: 3 additions & 3 deletions discord/poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
class PollMedia:
"""Represents the poll media for a poll item.
.. versionadded:: 2.4
.. versionadded:: 2.1
Attributes
----------
Expand Down Expand Up @@ -113,7 +113,7 @@ class PollAnswer:
Returns this answer's text, if any.
.. versionadded:: 2.4
.. versionadded:: 2.1
Attributes
----------
Expand Down Expand Up @@ -300,7 +300,7 @@ async def voters(
class Poll:
"""Represents a message's Poll.
.. versionadded:: 2.4
.. versionadded:: 2.1
Parameters
----------
Expand Down
8 changes: 4 additions & 4 deletions discord/raw_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class RawReactionActionEvent(_RawReprMixin):
burst: :class:`bool`
Whether the reaction was a burst reaction, also known as a "super reaction".
.. versionadded:: 2.4
.. versionadded:: 2.1
burst_colours: List[:class:`Colour`]
A list of colours used for burst reaction animation. Only available if ``burst`` is ``True``
and if ``event_type`` is ``REACTION_ADD``.
Expand All @@ -219,7 +219,7 @@ class RawReactionActionEvent(_RawReprMixin):
type: :class:`ReactionType`
The type of the reaction.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""

__slots__ = (
Expand Down Expand Up @@ -257,7 +257,7 @@ def __init__(self, data: ReactionActionEvent, emoji: PartialEmoji, event_type: R
def burst_colors(self) -> List[Colour]:
"""An alias of :attr:`burst_colours`.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return self.burst_colours

Expand Down Expand Up @@ -514,7 +514,7 @@ class RawPollVoteActionEvent(_RawReprMixin):
"""Represents the payload for a :func:`on_raw_poll_vote_add` or :func:`on_raw_poll_vote_remove`
event.
.. versionadded:: 2.4
.. versionadded:: 2.1
Attributes
----------
Expand Down
8 changes: 4 additions & 4 deletions discord/reaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ class Reaction:
me_burst: :class:`bool`
If the user sent this super reaction.
.. versionadded:: 2.4
.. versionadded:: 2.1
normal_count: :class:`int`
The number of times this reaction was made using normal reactions.
This is not available in the gateway events such as :func:`on_reaction_add`
or :func:`on_reaction_remove`.
.. versionadded:: 2.4
.. versionadded:: 2.1
burst_count: :class:`int`
The number of times this reaction was made using super reactions.
This is not available in the gateway events such as :func:`on_reaction_add`
or :func:`on_reaction_remove`.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""

__slots__ = ('message', 'count', 'emoji', 'me', 'me_burst', 'normal_count', 'burst_count')
Expand Down Expand Up @@ -226,7 +226,7 @@ async def users(
The type of reaction to return users from.
Defaults to :attr:`ReactionType.normal`.
.. versionadded:: 2.4
.. versionadded:: 2.1
Raises
--------
Expand Down
2 changes: 1 addition & 1 deletion discord/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def members(self) -> List[Member]:
def flags(self) -> RoleFlags:
""":class:`RoleFlags`: Returns the role's flags.
.. versionadded:: 2.4
.. versionadded:: 2.1
"""
return RoleFlags._from_value(self._flags)

Expand Down
2 changes: 1 addition & 1 deletion discord/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ async def delete(self, *, reason: Optional[str] = None) -> None:
The reason for deleting this thread.
Shows up on the audit log.
.. versionadded:: 2.4
.. versionadded:: 2.1
Raises
-------
Expand Down
2 changes: 1 addition & 1 deletion discord/voice_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ async def move_to(self, channel: Optional[abc.Snowflake], *, timeout: Optional[f
timeout: Optional[:class:`float`]
How long to wait for the move to complete.
.. versionadded:: 2.4
.. versionadded:: 2.1
Raises
-------
Expand Down
2 changes: 1 addition & 1 deletion discord/webhook/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ async def send(
When sending a Poll via webhook, you cannot manually end it.
.. versionadded:: 2.4
.. versionadded:: 2.1
Raises
--------
Expand Down
Loading

0 comments on commit 008a959

Please sign in to comment.