From 00fed750927ad283fda9de624b9423830e963acd Mon Sep 17 00:00:00 2001 From: dolfies Date: Wed, 4 Dec 2024 02:23:42 -0500 Subject: [PATCH] Fix version directives --- discord/abc.py | 2 +- discord/channel.py | 2 +- discord/colour.py | 2 +- discord/ext/commands/converter.py | 14 +++++++------- discord/ext/commands/parameters.py | 4 ++-- discord/flags.py | 2 +- discord/guild.py | 10 +++++----- discord/message.py | 18 +++++++++--------- discord/permissions.py | 4 ++-- discord/voice_client.py | 2 +- docs/api.rst | 4 ++-- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/discord/abc.py b/discord/abc.py index 5fdcff130..400709a16 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -1279,7 +1279,7 @@ class GuildChannel: .. versionadded:: 1.1 - .. versionchanged:: 2.5 + .. versionchanged:: 2.1 The ``category`` keyword-only parameter was added. diff --git a/discord/channel.py b/discord/channel.py index 76e4bb896..182e7fa08 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -4593,7 +4593,7 @@ class PartialMessageable(discord.abc.Messageable, Hashable): def mention(self) -> str: """:class:`str`: Returns a string that allows you to mention the channel. - .. versionadded:: 2.5 + .. versionadded:: 2.1 """ return f'<#{self.id}>' diff --git a/discord/colour.py b/discord/colour.py index 38a01b881..10b66f6f0 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -518,7 +518,7 @@ class Colour: .. colour:: #EB459F - .. versionadded:: 2.3 + .. versionadded:: 2.1 """ return cls(0xEB459F) diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index e28a98132..2c955b2c6 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -447,7 +447,7 @@ class GuildChannelConverter(IDConverter[discord.abc.GuildChannel]): .. versionadded:: 2.0 - .. versionchanged:: 2.4 + .. versionchanged:: 2.1 Add lookup by channel URL, accessed via "Copy Link" in the Discord client within channels. """ @@ -541,7 +541,7 @@ class TextChannelConverter(IDConverter[discord.TextChannel]): .. versionchanged:: 1.5 Raise :exc:`.ChannelNotFound` instead of generic :exc:`.BadArgument` - .. versionchanged:: 2.4 + .. versionchanged:: 2.1 Add lookup by channel URL, accessed via "Copy Link" in the Discord client within channels. """ @@ -565,7 +565,7 @@ class VoiceChannelConverter(IDConverter[discord.VoiceChannel]): .. versionchanged:: 1.5 Raise :exc:`.ChannelNotFound` instead of generic :exc:`.BadArgument` - .. versionchanged:: 2.4 + .. versionchanged:: 2.1 Add lookup by channel URL, accessed via "Copy Link" in the Discord client within channels. """ @@ -588,7 +588,7 @@ class StageChannelConverter(IDConverter[discord.StageChannel]): 3. Lookup by channel URL. 4. Lookup by name - .. versionchanged:: 2.4 + .. versionchanged:: 2.1 Add lookup by channel URL, accessed via "Copy Link" in the Discord client within channels. """ @@ -609,7 +609,7 @@ class CategoryChannelConverter(IDConverter[discord.CategoryChannel]): 3. Lookup by channel URL. 4. Lookup by name - .. versionchanged:: 2.4 + .. versionchanged:: 2.1 Add lookup by channel URL, accessed via "Copy Link" in the Discord client within channels. .. versionchanged:: 1.5 @@ -634,7 +634,7 @@ class ThreadConverter(IDConverter[discord.Thread]): .. versionadded: 2.0 - .. versionchanged:: 2.4 + .. versionchanged:: 2.1 Add lookup by channel URL, accessed via "Copy Link" in the Discord client within channels. """ @@ -657,7 +657,7 @@ class ForumChannelConverter(IDConverter[discord.ForumChannel]): .. versionadded:: 2.0 - .. versionchanged:: 2.4 + .. versionchanged:: 2.1 Add lookup by channel URL, accessed via "Copy Link" in the Discord client within channels. """ diff --git a/discord/ext/commands/parameters.py b/discord/ext/commands/parameters.py index 33592c74a..cdbb4a8fe 100644 --- a/discord/ext/commands/parameters.py +++ b/discord/ext/commands/parameters.py @@ -187,7 +187,7 @@ class Parameter(inspect.Parameter): def displayed_name(self) -> Optional[str]: """Optional[:class:`str`]: The name that is displayed to the user. - .. versionadded:: 2.3 + .. versionadded:: 2.1 """ return self._displayed_name if self._displayed_name is not empty else None @@ -245,7 +245,7 @@ def parameter( displayed_name: :class:`str` The name that is displayed to the user. - .. versionadded:: 2.3 + .. versionadded:: 2.1 """ if isinstance(default, Parameter): if displayed_default is empty: diff --git a/discord/flags.py b/discord/flags.py index 65b1c164e..4260d4489 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -678,7 +678,7 @@ class MessageFlags(BaseFlags): def forwarded(self): """:class:`bool`: Returns ``True`` if the message is a forwarded message. - .. versionadded:: 2.5 + .. versionadded:: 2.1 """ return 16384 diff --git a/discord/guild.py b/discord/guild.py index ead192835..4e2599c53 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -3983,7 +3983,7 @@ class Guild(Hashable): Retrieves a :class:`Role` with the specified ID. - .. versionadded:: 2.5 + .. versionadded:: 2.1 .. note:: @@ -5578,7 +5578,7 @@ class Guild(Hashable): def dm_spam_detected_at(self) -> Optional[datetime.datetime]: """:class:`datetime.datetime`: Returns the time when DM spam was detected in the guild. - .. versionadded:: 2.5 + .. versionadded:: 2.1 """ if not self._incidents_data: return None @@ -5589,7 +5589,7 @@ class Guild(Hashable): def raid_detected_at(self) -> Optional[datetime.datetime]: """Optional[:class:`datetime.datetime`]: Returns the time when a raid was detected in the guild. - .. versionadded:: 2.5 + .. versionadded:: 2.1 """ if not self._incidents_data: return None @@ -5619,7 +5619,7 @@ class Guild(Hashable): def is_dm_spam_detected(self) -> bool: """:class:`bool`: Whether DM spam was detected in the guild. - .. versionadded:: 2.5 + .. versionadded:: 2.1 """ if not self.dm_spam_detected_at: return False @@ -5629,7 +5629,7 @@ class Guild(Hashable): def is_raid_detected(self) -> bool: """:class:`bool`: Whether a raid was detected in the guild. - .. versionadded:: 2.5 + .. versionadded:: 2.1 """ if not self.raid_detected_at: return False diff --git a/discord/message.py b/discord/message.py index 91c563d4f..31b55f13b 100644 --- a/discord/message.py +++ b/discord/message.py @@ -475,7 +475,7 @@ class DeletedReferencedMessage: class MessageSnapshot: """Represents a message snapshot attached to a forwarded message. - .. versionadded:: 2.5 + .. versionadded:: 2.1 Attributes ----------- @@ -612,7 +612,7 @@ class MessageReference: type: :class:`MessageReferenceType` The type of message reference. - .. versionadded:: 2.5 + .. versionadded:: 2.1 message_id: Optional[:class:`int`] The id of the message referenced. channel_id: :class:`int` @@ -690,7 +690,7 @@ class MessageReference: type: :class:`~discord.MessageReferenceType` The type of message reference this is. - .. versionadded:: 2.5 + .. versionadded:: 2.1 Returns ------- @@ -789,7 +789,7 @@ class RoleSubscriptionInfo: class GuildProductPurchase: """Represents a message's guild product that the user has purchased. - .. versionadded:: 2.5 + .. versionadded:: 2.1 Attributes ----------- @@ -820,7 +820,7 @@ class PurchaseNotification: This is currently only attached to messages of type :attr:`MessageType.purchase_notification`. - .. versionadded:: 2.5 + .. versionadded:: 2.1 Attributes ----------- @@ -1659,7 +1659,7 @@ class PartialMessage(Hashable): type: :class:`MessageReferenceType` The type of message reference. - .. versionadded:: 2.5 + .. versionadded:: 2.1 Returns --------- @@ -1679,7 +1679,7 @@ class PartialMessage(Hashable): Forwards this message to a channel. - .. versionadded:: 2.5 + .. versionadded:: 2.1 Parameters ---------- @@ -1862,11 +1862,11 @@ class Message(PartialMessage, Hashable): purchase_notification: Optional[:class:`PurchaseNotification`] The data of the purchase notification that prompted this :attr:`MessageType.purchase_notification` message. - .. versionadded:: 2.5 + .. versionadded:: 2.1 message_snapshots: List[:class:`MessageSnapshot`] The message snapshots attached to this message. - .. versionadded:: 2.5 + .. versionadded:: 2.1 hit: :class:`bool` Whether the message was a hit in a search result. As surrounding messages are no longer returned in search results, this is always ``True`` for search results. diff --git a/discord/permissions.py b/discord/permissions.py index 18b810881..36a7e2bd3 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -259,7 +259,7 @@ class Permissions(BaseFlags): .. versionchanged:: 2.1 Added :attr:`create_expressions` permission. - .. versionchanged:: 2.4 + .. versionchanged:: 2.1 Added :attr:`view_creator_monetization_analytics` permission. """ return cls(0b0000_0000_0000_0000_0000_1010_0000_0000_0111_0000_0000_1000_0000_0100_1011_0000) @@ -292,7 +292,7 @@ class Permissions(BaseFlags): .. versionchanged:: 2.1 Added :attr:`send_voice_messages` permission. - .. versionchanged:: 2.4 + .. versionchanged:: 2.1 Added :attr:`send_polls` and :attr:`use_external_apps` permissions. """ return cls(0b0000_0000_0000_0110_0100_0000_0111_1100_1000_0000_0000_0111_1111_1000_0100_0000) diff --git a/discord/voice_client.py b/discord/voice_client.py index 5f7465560..793732825 100644 --- a/discord/voice_client.py +++ b/discord/voice_client.py @@ -439,7 +439,7 @@ class VoiceClient(VoiceProtocol): .. versionchanged:: 2.0 Instead of writing to ``sys.stderr``, the library's logger is used. - .. versionchanged:: 2.4 + .. versionchanged:: 2.1 Added encoder parameters as keyword arguments. Parameters diff --git a/docs/api.rst b/docs/api.rst index 767317244..f8b8fbf4f 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -2021,7 +2021,7 @@ of :class:`enum.Enum`. The system message sent when a purchase is made in the guild. - .. versionadded:: 2.5 + .. versionadded:: 2.1 .. class:: UserFlags @@ -6093,7 +6093,7 @@ of :class:`enum.Enum`. Represents the type of a message reference. - .. versionadded:: 2.5 + .. versionadded:: 2.1 .. attribute:: reply