diff --git a/CHANGELOG.md b/CHANGELOG.md index bf46f70f5b..6491019dc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ These changes are available on the `master` branch, but have not yet been releas - Fix `Enum` options not setting the correct type when only one choice is available. ([#2577](https://github.com/Pycord-Development/pycord/pull/2577)) -### Changed +### Changed - Renamed `cover` property of `ScheduledEvent` and `cover` argument of `ScheduledEvent.edit` to `image`. @@ -70,7 +70,7 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.6.0] - 2024-07-09 -### Added +### Added - Added `banner` parameter to `ClientUser.edit`. ([#2396](https://github.com/Pycord-Development/pycord/pull/2396)) @@ -101,7 +101,7 @@ These changes are available on the `master` branch, but have not yet been releas - Added `MessageCall` information. ([#2488](https://github.com/Pycord-Development/pycord/pull/2488)) -### Fixed +### Fixed - Fixed the type-hinting of `Member.move_to` and `Member.edit` to reflect actual behavior. ([#2386](https://github.com/Pycord-Development/pycord/pull/2386)) @@ -141,7 +141,7 @@ These changes are available on the `master` branch, but have not yet been releas - Further fixed logic when fetching audit logs. ([#2492](https://github.com/Pycord-Development/pycord/pull/2492)) -### Changed +### Changed - Changed the type of `Guild.bitrate_limit` to `int`. ([#2387](https://github.com/Pycord-Development/pycord/pull/2387)) @@ -164,7 +164,7 @@ These changes are available on the `master` branch, but have not yet been releas - Changed the error message that appears when attempting to add a subcommand group to a subcommand group. ([#2275](https://github.com/Pycord-Development/pycord/pull/2275)) -### Removed +### Removed - Removed the `delete_message_days` parameter from ban methods. Please use `delete_message_seconds` instead. @@ -177,7 +177,7 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.5.0] - 2024-03-02 -### Added +### Added - Added method to start bot via async context manager. ([#1801](https://github.com/Pycord-Development/pycord/pull/1801)) @@ -267,7 +267,7 @@ These changes are available on the `master` branch, but have not yet been releas - Added audit log support for voice channel status. ([#2373](https://github.com/Pycord-Development/pycord/pull/2373)) -### Changed +### Changed - Changed default for all `name_localizations` and `description_localizations` attributes from being `None` to being `MISSING`. @@ -302,14 +302,14 @@ These changes are available on the `master` branch, but have not yet been releas - `BridgeOption` must now be used for arguments in bridge commands. ([#2252](https://github.com/Pycord-Development/pycord/pull/2252)) -### Removed +### Removed - Removed `Client.once` in favour of `once` argument in `Client.listen`. ([#1957](https://github.com/Pycord-Development/pycord/pull/1957)) - Removed `Embed.Empty` in favour of `None`, and `EmbedProxy` in favour of individual classes. ([#2063](https://github.com/Pycord-Development/pycord/pull/2063)) -### Fixed +### Fixed - Fixed `AttributeError` caused by [#1957](https://github.com/Pycord-Development/pycord/pull/1957) when using listeners @@ -418,13 +418,13 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.4.1] - 2023-03-20 -### Changed +### Changed - Updated the values of the `Color.embed_background()` classmethod to correspond with new theme colors in the app. ([#1931](https://github.com/Pycord-Development/pycord/pull/1931)) -### Fixed +### Fixed - Fixed the type-hinting of `SlashCommandGroup.walk_commands()` to reflect actual behavior. ([#1838](https://github.com/Pycord-Development/pycord/pull/1838)) @@ -437,7 +437,7 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.4.0] - 2023-02-10 -### Added +### Added - Added new AutoMod trigger metadata properties `regex_patterns`, `allow_list`, and `mention_total_limit`; and added the `mention_spam` trigger type. @@ -464,7 +464,7 @@ These changes are available on the `master` branch, but have not yet been releas - Improved support for setting channel types & added new channel types for `discord.Option`. ([#1883](https://github.com/Pycord-Development/pycord/pull/1883)) -### Changed +### Changed - Changed `EmbeddedActivity` values to update accordingly with the new activities. ([#1859](https://github.com/Pycord-Development/pycord/pull/1859)) @@ -474,7 +474,7 @@ These changes are available on the `master` branch, but have not yet been releas - The `version_info.release_level` attribute has been reverted to its previous name, `releaselevel`. ([#1920](https://github.com/Pycord-Development/pycord/pull/1920)) -### Fixed +### Fixed - Fixed bugs in `Page.update_files` where file objects stored in memory were causing an `AttributeError`, and `io.BytesIO` files didn't send properly more than once. @@ -487,12 +487,14 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.3.3] - 2023-02-10 +### Fixed + - Fixed an unhandled `KeyError` exception when receiving GIF stickers, causing crashes. ([#1915](https://github.com/Pycord-Development/pycord/pull/1915)) ## [2.3.2] - 2022-12-03 -### Fixed +### Fixed - Fixed another `AttributeError` relating to the new `bridge_commands` attribute on `ext.bridge.Bot`. ([#1815](https://github.com/Pycord-Development/pycord/pull/1815)) @@ -503,14 +505,14 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.3.1] - 2022-11-27 -### Fixed +### Fixed - Fixed `AttributeError` relating to the new `bridge_commands` attribute on `ext.bridge.Bot`. ([#1802](https://github.com/Pycord-Development/pycord/pull/1802)) ## [2.3.0] - 2022-11-23 -### Added +### Added - New brief Attribute to BridgeSlashCommand. ([#1676](https://github.com/Pycord-Development/pycord/pull/1676)) @@ -531,7 +533,7 @@ These changes are available on the `master` branch, but have not yet been releas - Updated `Guild.features` to include new and previously missing features. ([#1788](https://github.com/Pycord-Development/pycord/pull/1788)) -### Fixed +### Fixed - Fix bridge.has_permissions. ([#1695](https://github.com/Pycord-Development/pycord/pull/1695)) @@ -541,7 +543,7 @@ These changes are available on the `master` branch, but have not yet been releas ([#1719](https://github.com/Pycord-Development/pycord/pull/1719) & [#1723](https://github.com/Pycord-Development/pycord/pull/1723)) -### Changed +### Changed - `get_application_command()` type kwarg now defaults to `ApplicationCommand`, so all command types can be retrieved by default. @@ -550,14 +552,14 @@ These changes are available on the `master` branch, but have not yet been releas ([#1678](https://github.com/Pycord-Development/pycord/pull/1678)) - -### Removed +### Removed - Removed the guild feature `PRIVATE_THREADS` due to paywall limitation removal. ([#1789](https://github.com/Pycord-Development/pycord/pull/1789)) ## [2.2.2] - 2022-10-05 -### Fixed +### Fixed - Fixed `parent` attribute of second-level subcommands being set to the base level command instead of the direct parent. @@ -565,12 +567,12 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.2.1] - 2022-10-05 -### Added +### Added - New `SlashCommand.qualified_id` attribute. ([#1672](https://github.com/Pycord-Development/pycord/pull/1672)) -### Fixed +### Fixed - Fixed a `TypeError` in `ban()` methods related to the new `delete_message_seconds` parameter. ([#1666](https://github.com/Pycord-Development/pycord/pull/1666)) @@ -581,7 +583,7 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.2.0] - 2022-10-02 -### Added +### Added - New Guild Feature `INVITES_DISABLED`. ([#1613](https://github.com/Pycord-Development/pycord/pull/1613)) @@ -603,7 +605,7 @@ These changes are available on the `master` branch, but have not yet been releas for `Interaction` objects. ([#1609](https://github.com/Pycord-Development/pycord/pull/1609)) -### Deprecated +### Deprecated - The `delete_message_days` parameter in ban methods is now deprecated. Please use `delete_message_seconds` instead. @@ -613,7 +615,7 @@ These changes are available on the `master` branch, but have not yet been releas `edit_original_response` & `delete_original_response` methods instead. ([#1609](https://github.com/Pycord-Development/pycord/pull/1609)) -### Fixed +### Fixed - Various fixes to ext.bridge groups. ([#1633](https://github.com/Pycord-Development/pycord/pull/1633) & @@ -627,14 +629,14 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.1.3] - 2022-09-06 -### Fixed +### Fixed - Fix TypeError in `process_application_commands`. ([#1622](https://github.com/Pycord-Development/pycord/pull/1622)) ## [2.1.2] - 2022-09-06 -### Fixed +### Fixed - Fix subcommands having MISSING cog attribute. ([#1594](https://github.com/Pycord-Development/pycord/pull/1594) & @@ -642,14 +644,14 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.1.1] - 2022-08-25 -### Fixed +### Fixed - Bridge command detection in cogs. ([#1592](https://github.com/Pycord-Development/pycord/pull/1592)) ## [2.1.0] - 2022-08-25 -### Added +### Added - Support for add, sub, union, intersect, and inverse operations on classes inheriting from `BaseFlags`. ([#1486](https://github.com/Pycord-Development/pycord/pull/1486)) @@ -680,7 +682,7 @@ These changes are available on the `master` branch, but have not yet been releas - Support for `InteractionMessage` via the `message` property of `View`. ([#1492](https://github.com/Pycord-Development/pycord/pull/1492)) -### Changed +### Changed - Use `slash_variant` and `ext_variant` attributes instead of `get_application_command()` and `get_ext_command()` methods on `BridgeCommand`. @@ -690,7 +692,7 @@ These changes are available on the `master` branch, but have not yet been releas - `commands.has_permissions()` check now returns `True` in DM channels. ([#1577](https://github.com/Pycord-Development/pycord/pull/1577)) -### Fixed +### Fixed - Fix `VoiceChannel`/`CategoryChannel` data being invalidated on `Option._invoke`. ([#1490](https://github.com/Pycord-Development/pycord/pull/1490)) @@ -736,21 +738,21 @@ These changes are available on the `master` branch, but have not yet been releas - Fix required parameters validation error. ([#1589](https://github.com/Pycord-Development/pycord/pull/1589)) -### Security +### Security - Improved fix for application-based bots without the bot scope ([#1584](https://github.com/Pycord-Development/pycord/pull/1584)) ## [2.0.1] - 2022-08-16 -### Security +### Security - Fix for application-based bots without the bot scope ([#1568](https://github.com/Pycord-Development/pycord/pull/1568)) ## [2.0.0] - 2022-07-08 -### Added +### Added - New `news` property on `TextChannel`. ([#1370](https://github.com/Pycord-Development/pycord/pull/1370)) @@ -782,7 +784,7 @@ These changes are available on the `master` branch, but have not yet been releas - Native timeout support for `Modal`. ([#1434](https://github.com/Pycord-Development/pycord/pull/1434)) -### Changed +### Changed - Updated to new sticker limit for premium guilds. ([#1420](https://github.com/Pycord-Development/pycord/pull/1420)) @@ -791,12 +793,12 @@ These changes are available on the `master` branch, but have not yet been releas - Updated deprecated IDENTIFY packet connection properties. ([#1430](https://github.com/Pycord-Development/pycord/pull/1430)) -### Removed +### Removed - `Guild.region` attribute (Deprecated on API, VoiceChannel.rtc_region should be used instead). ([#1429](https://github.com/Pycord-Development/pycord/pull/1429)) -### Fixed +### Fixed - Change `guild_only` to `dm_permission` in application command `to_dict` method. ([#1368](https://github.com/Pycord-Development/pycord/pull/1368)) @@ -839,7 +841,7 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.0.0-rc.1] - 2022-05-17 -### Added +### Added - A `delete_after` kwarg to `Paginator.send`. ([#1245](https://github.com/Pycord-Development/pycord/pull/1245)) @@ -889,7 +891,7 @@ These changes are available on the `master` branch, but have not yet been releas - Support event covers for audit logs. ([#1355](https://github.com/Pycord-Development/pycord/pull/1355)) -### Changed +### Changed - Removed implicit defer call in `View`. ([#1260](https://github.com/Pycord-Development/pycord/pull/1260)) @@ -902,7 +904,7 @@ These changes are available on the `master` branch, but have not yet been releas - Renamed `delete_exiting` to `delete_existing` (typo). ([#1336](https://github.com/Pycord-Development/pycord/pull/1336)) -### Fixed +### Fixed - Fix `PartialMessage.edit()` setting `view` as `None` when `view` kwarg is not passed. ([#1256](https://github.com/Pycord-Development/pycord/pull/1256)) @@ -939,7 +941,7 @@ These changes are available on the `master` branch, but have not yet been releas ## [2.0.0-beta.7] - 2022-04-09 -### Fixed +### Fixed - Fix py3.10 UnionType checks issue. ([#1240](https://github.com/Pycord-Development/pycord/pull/1240)) diff --git a/discord/client.py b/discord/client.py index 7f13696f6f..5f59ae3b08 100644 --- a/discord/client.py +++ b/discord/client.py @@ -1230,7 +1230,7 @@ def add_listener(self, func: Coro, name: str = MISSING) -> None: TypeError The ``func`` parameter is not a coroutine function. ValueError - The ``name`` (event name) does not start with 'on_' + The ``name`` (event name) does not start with ``on_`` Example ------- @@ -1294,7 +1294,7 @@ def listen(self, name: str = MISSING, once: bool = False) -> Callable[[Coro], Co TypeError The function being listened to is not a coroutine. ValueError - The ``name`` (event name) does not start with 'on_' + The ``name`` (event name) does not start with ``on_`` Example ------- diff --git a/discord/guild.py b/discord/guild.py index 75fcc7c5c7..57cfcb44da 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -103,6 +103,7 @@ TextChannel, VoiceChannel, ) + from .onboarding import OnboardingMode, OnboardingPrompt from .permissions import Permissions from .state import ConnectionState from .template import Template @@ -173,8 +174,6 @@ class Guild(Hashable): The channel that denotes the AFK channel. ``None`` if it doesn't exist. id: :class:`int` The guild's ID. - invites_disabled: :class:`bool` - Indicates if the guild invites are disabled. owner_id: :class:`int` The guild owner's ID. Use :attr:`Guild.owner` instead. unavailable: :class:`bool` diff --git a/discord/raw_models.py b/discord/raw_models.py index a2881839a6..9e53f67e62 100644 --- a/discord/raw_models.py +++ b/discord/raw_models.py @@ -102,7 +102,7 @@ class RawMessageDeleteEvent(_RawReprMixin): cached_message: Optional[:class:`Message`] The cached message, if found in the internal message cache. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -134,7 +134,7 @@ class RawBulkMessageDeleteEvent(_RawReprMixin): cached_messages: List[:class:`Message`] The cached messages, if found in the internal message cache. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -170,7 +170,7 @@ class RawMessageUpdateEvent(_RawReprMixin): .. versionadded:: 1.7 data: :class:`dict` - The raw data sent by the `gateway `_ + The raw data sent by the |gateway| cached_message: Optional[:class:`Message`] The cached message, if found in the internal message cache. Represents the message before it is modified by the data in :attr:`RawMessageUpdateEvent.data`. @@ -227,7 +227,7 @@ class RawReactionActionEvent(_RawReprMixin): type: :class:`ReactionType` The type of reaction added. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -280,7 +280,7 @@ class RawReactionClearEvent(_RawReprMixin): guild_id: Optional[:class:`int`] The guild ID where the reactions got cleared. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -322,7 +322,7 @@ class RawReactionClearEmojiEvent(_RawReprMixin): type: :class:`ReactionType` The type of reaction removed. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -369,7 +369,7 @@ class RawIntegrationDeleteEvent(_RawReprMixin): guild_id: :class:`int` The guild ID where the integration got deleted. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -403,7 +403,7 @@ class RawThreadUpdateEvent(_RawReprMixin): parent_id: :class:`int` The ID of the channel the thread belongs to. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. thread: :class:`discord.Thread` | None The thread, if it could be found in the internal cache. """ @@ -438,7 +438,7 @@ class RawThreadDeleteEvent(_RawReprMixin): thread: Optional[:class:`discord.Thread`] The thread that was deleted. This may be ``None`` if deleted thread is not found in internal cache. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -468,7 +468,7 @@ class RawVoiceChannelStatusUpdateEvent(_RawReprMixin): status: Optional[:class:`str`] The new new voice channel status. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. """ __slots__ = ("id", "guild_id", "status", "data") @@ -502,7 +502,7 @@ class RawTypingEvent(_RawReprMixin): member: Optional[:class:`Member`] The member who started typing. Only available if the member started typing in a guild. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -536,7 +536,7 @@ class RawMemberRemoveEvent(_RawReprMixin): guild_id: :class:`int` The ID of the guild the user left. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -567,7 +567,7 @@ class RawScheduledEventSubscription(_RawReprMixin): Can be either ``USER_ADD`` or ``USER_REMOVE`` depending on the event called. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -627,7 +627,7 @@ class AutoModActionExecutionEvent: matched_content: :class:`str` The substring in the content that was matched. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -722,7 +722,7 @@ class RawThreadMembersUpdateEvent(_RawReprMixin): member_count: :class:`int` The approximate number of members in the thread. Maximum of 50. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. .. versionadded:: 2.5 """ @@ -763,7 +763,7 @@ class RawAuditLogEntryEvent(_RawReprMixin): contains extra information. See :class:`AuditLogAction` for which actions have this field filled out. data: :class:`dict` - The raw data sent by the `gateway `_. + The raw data sent by the |gateway|. """ __slots__ = ( @@ -814,7 +814,7 @@ class RawMessagePollVoteEvent(_RawReprMixin): added: :class:`bool` Whether this vote was added or removed. data: :class:`dict` - The raw data sent by the `gateway ` + The raw data sent by the |gateway|. """ __slots__ = ( diff --git a/docs/api/application_commands.rst b/docs/api/application_commands.rst index 2fe39f0760..f57eb224a4 100644 --- a/docs/api/application_commands.rst +++ b/docs/api/application_commands.rst @@ -38,6 +38,9 @@ Shortcut Decorators .. autofunction:: discord.commands.message_command :decorator: +.. autofunction:: discord.commands.option + :decorator: + Objects ~~~~~~~ @@ -61,17 +64,6 @@ Objects .. autoclass:: MessageCommand :members: -Options -------- - -Shortcut Decorators -~~~~~~~~~~~~~~~~~~~ -.. autofunction:: discord.commands.option - :decorator: - -Objects -~~~~~~~ - .. attributetable:: Option .. autoclass:: Option :members: diff --git a/docs/api/enums.rst b/docs/api/enums.rst index c734e2fd1e..ec75461c47 100644 --- a/docs/api/enums.rst +++ b/docs/api/enums.rst @@ -907,7 +907,7 @@ of :class:`enum.Enum`. When this is the action, the type of :attr:`~AuditLogEntry.extra` is either a :class:`Role` or :class:`Member`. If the object is not found then it is a :class:`Object` with an ID being filled, a name, and a - ``type`` attribute set to either ``'role'`` or ``'member'`` to help + ``type`` attribute set to either ``role`` or ``member`` to help dictate what type of ID it is. Possible attributes for :class:`AuditLogDiff`: @@ -2362,7 +2362,7 @@ of :class:`enum.Enum`. .. attribute:: advanced - Both default channels and questions (``OnboardingPrompt``s) will count towards the Onboarding requirements. + Both default channels and questions (``OnboardingPrompt``) will count towards the Onboarding requirements. .. class:: ReactionType diff --git a/docs/conf.py b/docs/conf.py index e0bdfa834a..3acd4ba09a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -490,7 +490,7 @@ def write_new(): linkcheck_anchors_ignore_for_url = [r"https://github.com/Delitefully/DiscordLists"] modindex_common_prefix = ["discord."] -# suppress_warnings = ['autosectionlabel.*'] +suppress_warnings = ["ref.duplicate"] myst_enable_extensions = [ "amsmath", "attrs_inline", diff --git a/docs/old_changelog.rst b/docs/old_changelog.rst index 62390f0e66..c5ff8c4da1 100644 --- a/docs/old_changelog.rst +++ b/docs/old_changelog.rst @@ -71,6 +71,8 @@ v1.7.2 Bug Fixes ~~~~~~~~~ +:noindex: + - Fix ``fail_if_not_exists`` causing certain message references to not be usable within :meth:`abc.Messageable.send` and :meth:`Message.reply` (:dpy-issue:`6726`) - Fix :meth:`Guild.chunk` hanging when the user left the guild. (:dpy-issue:`6730`) - Fix loop sleeping after final iteration rather than before (:dpy-issue:`6744`) @@ -83,6 +85,8 @@ v1.7.1 Bug Fixes ~~~~~~~~~ +:noindex: + - |commands| Fix :meth:`Cog.has_error_handler ` not working as intended. .. _vp1p7p0: @@ -99,6 +103,8 @@ Development of v2.0 will have breaking changes and support for newer API feature New Features ~~~~~~~~~~~~ +:noindex: + - Add support for stage channels via :class:`StageChannel` (:dpy-issue:`6602`, :dpy-issue:`6608`) - Add support for :attr:`MessageReference.fail_if_not_exists` (:dpy-issue:`6484`) - By default, if the message you're replying to doesn't exist then the API errors out. @@ -142,6 +148,8 @@ New Features Bug Fixes ~~~~~~~~~ +:noindex: + - Fix mentions not working if ``mention_author`` is passed in :meth:`abc.Messageable.send` without :attr:`Client.allowed_mentions` set (:dpy-issue:`6192`, :dpy-issue:`6458`) - Fix user created instances of :class:`CustomActivity` triggering an error (:dpy-issue:`4049`) - Note that currently, bot users still cannot set a custom activity due to a Discord limitation. @@ -164,6 +172,8 @@ Bug Fixes Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - User endpoints and all userbot related functionality has been deprecated and will be removed in the next major version of the library. - :class:`Permission` class methods were updated to match the UI of the Discord client (:dpy-issue:`6476`) - ``_`` and ``-`` characters are now stripped when making a new cog using the ``discord`` package (:dpy-issue:`6313`) @@ -178,6 +188,8 @@ This version comes with support for replies and stickers. New Features ~~~~~~~~~~~~ +:noindex: + - An entirely redesigned documentation. This was the cumulation of multiple months of effort. - There's now a dark theme, feel free to navigate to the cog on the screen to change your setting, though this should be automatic. - Add support for :meth:`AppInfo.icon_url_as` and :meth:`AppInfo.cover_image_url_as` (:dpy-issue:`5888`) @@ -215,6 +227,8 @@ New Features Bug Fixes ~~~~~~~~~ +:noindex: + - Raise :exc:`DiscordServerError` when reaching 503s repeatedly (:dpy-issue:`6044`) - Fix :exc:`AttributeError` when :meth:`Client.fetch_template` is called (:dpy-issue:`5986`) - Fix errors when playing audio and moving to another channel (:dpy-issue:`5953`) @@ -231,6 +245,8 @@ Bug Fixes Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - ``ffmpeg`` spawned processes no longer open a window in Windows (:dpy-issue:`6038`) - Update dependencies to allow the library to work on Python 3.9+ without requiring build tools. (:dpy-issue:`5984`, :dpy-issue:`5970`) - Fix docstring issue leading to a SyntaxError in 3.9 (:dpy-issue:`6153`) @@ -248,6 +264,8 @@ v1.5.1 Bug Fixes ~~~~~~~~~ +:noindex: + - Fix :func:`utils.escape_markdown` not escaping quotes properly (:dpy-issue:`5897`) - Fix :class:`Message` not being hashable (:dpy-issue:`5901`, :dpy-issue:`5866`) - Fix moving channels to the end of the channel list (:dpy-issue:`5923`) @@ -260,6 +278,8 @@ Bug Fixes Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - Members are now loaded during ``GUILD_MEMBER_UPDATE`` events if :attr:`MemberCacheFlags.joined` is set. (:dpy-issue:`5930`) - |commands| :class:`MemberConverter ` now properly lazily fetches members if not available from cache. - This is the same as having ``discord.Member`` as the type-hint. @@ -275,12 +295,16 @@ This version came with forced breaking changes that Discord is requiring all bot API Changes ~~~~~~~~~~~ +:noindex: + - Members and presences will no longer be retrieved due to an API change. See :ref:`privileged_intents` for more info. - As a consequence, fetching offline members is disabled if the members intent is not enabled. New Features ~~~~~~~~~~~~ +:noindex: + - Support for gateway intents, passed via ``intents`` in :class:`Client` using :class:`Intents`. - Add :attr:`VoiceRegion.south_korea` (:dpy-issue:`5233`) - Add support for ``__eq__`` for :class:`Message` (:dpy-issue:`5789`) @@ -301,6 +325,8 @@ New Features Bug Fixes ~~~~~~~~~ +:noindex: + - Fix issue with :meth:`Guild.by_category` not showing certain channels. - Fix :attr:`abc.GuildChannel.permissions_synced` always being ``False`` (:dpy-issue:`5772`) - Fix handling of cloudflare bans on webhook related requests (:dpy-issue:`5221`) @@ -316,6 +342,8 @@ Bug Fixes Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - Webhook requests are now logged (:dpy-issue:`5798`) - Remove caching layer from :attr:`AutoShardedClient.shards`. This was causing issues if queried before launching shards. - Gateway rate limits are now handled. @@ -335,6 +363,8 @@ This is a maintenance release with backports from :ref:`vp1p5p0`. Bug Fixes ~~~~~~~~~ +:noindex: + - Fix issue with :meth:`Guild.by_category` not showing certain channels. - Fix :attr:`abc.GuildChannel.permissions_synced` always being ``False`` (:dpy-issue:`5772`) - Fix handling of cloudflare bans on webhook related requests (:dpy-issue:`5221`) @@ -350,6 +380,8 @@ Bug Fixes Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - Remove caching layer from :attr:`AutoShardedClient.shards`. This was causing issues if queried before launching shards. - |tasks| Lazily fetch the event loop to prevent surprises when changing event loop policy (:dpy-issue:`5808`) @@ -361,6 +393,8 @@ v1.4.1 Bug Fixes ~~~~~~~~~ +:noindex: + - Properly terminate the connection when :meth:`Client.close` is called (:dpy-issue:`5207`) - Fix error being raised when clearing embed author or image when it was already cleared (:dpy-issue:`5210`, :dpy-issue:`5212`) - Fix ``__path__`` to allow editable extensions (:dpy-issue:`5213`) @@ -375,6 +409,8 @@ Another version with a long development time. Features like Intents are slated t New Features ~~~~~~~~~~~~ +:noindex: + - Add support for :class:`AllowedMentions` to have more control over what gets mentioned. - This can be set globally through :attr:`Client.allowed_mentions` - This can also be set on a per message basis via :meth:`abc.Messageable.send` @@ -432,6 +468,8 @@ New Features Bug Fixes ~~~~~~~~~ +:noindex: + - Fix issue with :attr:`PartialEmoji.url` reads leading to a failure (:dpy-issue:`4015`, :dpy-issue:`4016`) - Allow :meth:`abc.Messageable.history` to take a limit of ``1`` even if ``around`` is passed (:dpy-issue:`4019`) - Fix :attr:`Guild.member_count` not updating in certain cases when a member has left the guild (:dpy-issue:`4021`) @@ -460,6 +498,8 @@ Bug Fixes Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - The :attr:`Member.roles` cache introduced in v1.3 was reverted due to issues caused (:dpy-issue:`4087`, :dpy-issue:`4157`) - :class:`Webhook` objects are now comparable and hashable (:dpy-issue:`4182`) - Some more API requests got a ``reason`` parameter for audit logs (:dpy-issue:`5086`) @@ -483,6 +523,8 @@ v1.3.4 Bug Fixes ~~~~~~~~~ +:noindex: + - Fix an issue with channel overwrites causing multiple issues including crashes (:dpy-issue:`5109`) .. _vp1p3p3: @@ -493,6 +535,8 @@ v1.3.3 Bug Fixes ~~~~~~~~~ +:noindex: + - Change default WS close to 4000 instead of 1000. - The previous close code caused sessions to be invalidated at a higher frequency than desired. @@ -508,6 +552,8 @@ Another minor bug fix release. Bug Fixes ~~~~~~~~~ +:noindex: + - Higher the wait time during the ``GUILD_CREATE`` stream before ``on_ready`` is fired for :class:`AutoShardedClient`. - :func:`on_voice_state_update` now uses the inner ``member`` payload which should make it more reliable. - Fix various Cloudflare handling errors (:dpy-issue:`2572`, :dpy-issue:`2544`) @@ -526,12 +572,16 @@ Minor bug fix release. Bug Fixes ~~~~~~~~~ +:noindex: + - Fix fetching invites in guilds that the user is not in. - Fix the channel returned from :meth:`Client.fetch_channel` raising when sending messages. (:dpy-issue:`2531`) Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - Fix compatibility warnings when using the Python 3.9 alpha. - Change the unknown event logging from WARNING to DEBUG to reduce noise. @@ -545,6 +595,8 @@ This version comes with a lot of bug fixes and new features. It's been in develo New Features ~~~~~~~~~~~~ +:noindex: + - Add :meth:`Guild.fetch_members` to fetch members from the HTTP API. (:dpy-issue:`2204`) - Add :meth:`Guild.fetch_roles` to fetch roles from the HTTP API. (:dpy-issue:`2208`) - Add support for teams via :class:`Team` when fetching with :meth:`Client.application_info`. (:dpy-issue:`2239`) @@ -611,6 +663,8 @@ New Features Bug Fixes ~~~~~~~~~ +:noindex: + - Fix issue with permission resolution sometimes failing for guilds with no owner. - Tokens are now stripped upon use. (:dpy-issue:`2135`) - Passing in a ``name`` is no longer required for :meth:`Emoji.edit`. (:dpy-issue:`2368`) @@ -635,6 +689,8 @@ Bug Fixes Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - The library now fully supports Python 3.8 without warnings. - Bump the dependency of ``websockets`` to 8.0 for those who can use it. (:dpy-issue:`2453`) - Due to Discord providing :class:`Member` data in mentions, users will now be upgraded to :class:`Member` more often if mentioned. @@ -662,6 +718,8 @@ v1.2.5 Bug Fixes ~~~~~~~~~ +:noindex: + - Fix a bug that caused crashes due to missing ``animated`` field in Emoji structures in reactions. .. _vp1p2p4: @@ -672,6 +730,8 @@ v1.2.4 Bug Fixes ~~~~~~~~~ +:noindex: + - Fix a regression when :attr:`Message.channel` would be ``None``. - Fix a regression where :attr:`Message.edited_at` would not update during edits. - Fix a crash that would trigger during message updates (GH-2265, :dpy-issue:`2287`). @@ -687,6 +747,8 @@ v1.2.3 Bug Fixes ~~~~~~~~~ +:noindex: + - Fix an AttributeError when accessing :attr:`Member.premium_since` in :func:`on_member_update`. (:dpy-issue:`2213`) - Handle :exc:`asyncio.CancelledError` in :meth:`abc.Messageable.typing` context manager. (:dpy-issue:`2218`) - Raise the max encoder bitrate to 512kbps to account for nitro boosting. (:dpy-issue:`2232`) @@ -701,6 +763,8 @@ v1.2.2 Bug Fixes ~~~~~~~~~ +:noindex: + - Audit log related attribute access have been fixed to not error out when they shouldn't have. .. _vp1p2p1: @@ -711,6 +775,8 @@ v1.2.1 Bug Fixes ~~~~~~~~~ +:noindex: + - :attr:`User.avatar_url` and related attributes no longer raise an error. - More compatibility shims with the ``enum.Enum`` code. @@ -724,6 +790,8 @@ This update mainly brings performance improvements and various nitro boosting at New Features ~~~~~~~~~~~~ +:noindex: + - Add :attr:`Guild.premium_tier` to query the guild's current nitro boost level. - Add :attr:`Guild.emoji_limit`, :attr:`Guild.bitrate_limit`, :attr:`Guild.filesize_limit` to query the new limits of a guild when taking into consideration boosting. - Add :attr:`Guild.premium_subscription_count` to query how many members are boosting a guild. @@ -747,6 +815,8 @@ New Features Bug Fixes ~~~~~~~~~ +:noindex: + - Fix internal error when using :meth:`Guild.prune_members`. - |commands| Fix :attr:`.Command.invoked_subcommand` being invalid in many cases. - |tasks| Reset iteration count when the loop terminates and is restarted. @@ -755,6 +825,8 @@ Bug Fixes Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - Improve performance of all Enum related code significantly. - This was done by replacing the ``enum.Enum`` code with an API compatible one. - This should not be a breaking change for most users due to duck-typing. @@ -777,11 +849,15 @@ v1.1.1 Bug Fixes ~~~~~~~~~ +:noindex: + - Webhooks do not overwrite data on retrying their HTTP requests (:dpy-issue:`2140`) Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - Add back signal handling to :meth:`Client.run` due to issues some users had with proper cleanup. .. _vp1p1p0: @@ -792,6 +868,8 @@ v1.1.0 New Features ~~~~~~~~~~~~ +:noindex: + - **There is a new extension dedicated to making background tasks easier.** - You can check the documentation here: :ref:`ext_tasks_api`. - Add :attr:`Permissions.stream` permission. (:dpy-issue:`2077`) @@ -808,6 +886,8 @@ New Features ``discord.ext.commands`` ++++++++++++++++++++++++ +:noindex: + - Add new :func:`~.commands.dm_only` check. - Support callable converters in :data:`~.commands.Greedy` - Add new :class:`~.commands.MessageConverter`. @@ -819,6 +899,8 @@ New Features Bug Fixes ~~~~~~~~~ +:noindex: + - Fix :exc:`AttributeError` when using ``__repr__`` on :class:`Widget`. - Fix issue with :attr:`abc.GuildChannel.overwrites` returning ``None`` for keys. - Remove incorrect legacy NSFW checks in e.g. :meth:`TextChannel.is_nsfw`. @@ -829,6 +911,8 @@ Bug Fixes ``discord.ext.commands`` ++++++++++++++++++++++++ +:noindex: + - Fix lambda converters in a non-module context (e.g. ``eval``). - Use message creation time for reference time when computing cooldowns. - This prevents cooldowns from triggering during e.g. a RESUME session. @@ -840,6 +924,8 @@ Bug Fixes Miscellaneous ~~~~~~~~~~~~~ +:noindex: + - Improve the performance of internal enum creation in the library by about 5x. - Make the output of ``python -m discord --version`` a bit more useful. - The loop cleanup facility has been rewritten again. @@ -848,6 +934,8 @@ Miscellaneous ``discord.ext.commands`` ++++++++++++++++++++++++ +:noindex: + - Custom exception classes are now used for all default checks in the library (:dpy-issue:`2101`) @@ -859,6 +947,8 @@ v1.0.1 Bug Fixes ~~~~~~~~~ +:noindex: + - Fix issue with speaking state being cast to ``int`` when it was invalid. - Fix some issues with loop cleanup that some users experienced on Linux machines. - Fix voice handshake race condition (:dpy-issue:`2056`, :dpy-issue:`2063`) @@ -878,6 +968,8 @@ v0.16.6 Bug Fixes ~~~~~~~~~ +:noindex: + - Fix issue with :meth:`Client.create_server` that made it stop working. - Fix main thread being blocked upon calling ``StreamPlayer.stop``. - Handle HEARTBEAT_ACK and resume gracefully when it occurs. @@ -894,6 +986,8 @@ This release is just a bug fix release with some better rate limit implementatio Bug Fixes ~~~~~~~~~ +:noindex: + - Servers are now properly chunked for user bots. - The CDN URL is now used instead of the API URL for assets. - Rate limit implementation now tries to use header information if possible. @@ -908,12 +1002,16 @@ v0.16.0 New Features ~~~~~~~~~~~~ +:noindex: + - Add :attr:`Channel.overwrites` to get all the permission overwrites of a channel. - Add :attr:`Server.features` to get information about partnered servers. Bug Fixes ~~~~~~~~~ +:noindex: + - Timeout when waiting for offline members while triggering :func:`on_ready`. - The fact that we did not timeout caused a gigantic memory leak in the library that caused @@ -940,6 +1038,8 @@ v0.15.0 New Features ~~~~~~~~~~~~ +:noindex: + - Rich Embeds for messages are now supported. - To do so, create your own :class:`Embed` and pass the instance to the ``embed`` keyword argument to :meth:`Client.send_message` or :meth:`Client.edit_message`. @@ -962,6 +1062,8 @@ v0.14.3 Bug Fixes ~~~~~~~~~ +:noindex: + - Fix crash when dealing with MESSAGE_REACTION_REMOVE - Fix incorrect buckets for reactions. @@ -973,12 +1075,16 @@ v0.14.2 New Features ~~~~~~~~~~~~ +:noindex: + - :meth:`Client.wait_for_reaction` now returns a namedtuple with ``reaction`` and ``user`` attributes. - This is for better support in the case that ``None`` is returned since tuple unpacking can lead to issues. Bug Fixes ~~~~~~~~~ +:noindex: + - Fix bug that disallowed ``None`` to be passed for ``emoji`` parameter in :meth:`Client.wait_for_reaction`. .. _v0p14p1: @@ -989,6 +1095,8 @@ v0.14.1 Bug fixes ~~~~~~~~~ +:noindex: + - Fix bug with `Reaction` not being visible at import. - This was also breaking the documentation. @@ -1002,6 +1110,8 @@ This update adds new API features and a couple of bug fixes. New Features ~~~~~~~~~~~~ +:noindex: + - Add support for Manage Webhooks permission under :attr:`Permissions.manage_webhooks` - Add support for ``around`` argument in 3.5+ :meth:`Client.logs_from`. - Add support for reactions. @@ -1016,6 +1126,8 @@ New Features Bug Fixes ~~~~~~~~~ +:noindex: + - Fix bug with Paginator still allowing lines that are too long. - Fix the :attr:`Permissions.manage_emojis` bit being incorrect. @@ -1029,6 +1141,8 @@ This is a backwards compatible update with new features. New Features ~~~~~~~~~~~~ +:noindex: + - Add the ability to manage emojis. - :meth:`Client.create_custom_emoji` to create new emoji. @@ -1052,6 +1166,8 @@ New Features Bug Fixes ~~~~~~~~~ +:noindex: + - Paginator pages do not exceed their max_size anymore (:dpy-issue:`340`) - Do Not Disturb users no longer show up offline due to the new :class:`Status` changes. @@ -1065,6 +1181,8 @@ This is a bug fix update that also comes with new features. New Features ~~~~~~~~~~~~ +:noindex: + - Add custom emoji support. - Adds a new class to represent a custom Emoji named :class:`Emoji` @@ -1104,6 +1222,8 @@ For the command extension, the following are new: Bug Fixes ~~~~~~~~~ +:noindex: + - Fix bug that caused the library to not work with the latest ``websockets`` library. - Fix bug that leaked keep alive threads (:dpy-issue:`309`) - Fix bug that disallowed :class:`ServerRegion` from being used in :meth:`Client.edit_server`. @@ -1120,11 +1240,15 @@ This is a minor bug fix update that comes with a gateway update (v5 -> v6). Breaking Changes ~~~~~~~~~~~~~~~~ +:noindex: + - ``Permissions.change_nicknames`` has been renamed to :attr:`Permissions.change_nickname` to match the UI. New Features ~~~~~~~~~~~~ +:noindex: + - Add the ability to prune members via :meth:`Client.prune_members`. - Switch the websocket gateway version to v6 from v5. This allows the library to work with group DMs and 1-on-1 calls. - Add :attr:`AppInfo.owner` attribute. @@ -1148,6 +1272,8 @@ For the command extension, the following are new: Bug Fixes ~~~~~~~~~ +:noindex: + - :attr:`Client.email` is now saved when using a token for user accounts. - Fix issue when removing roles out of order. - Fix bug where discriminators would not update. @@ -1171,6 +1297,9 @@ For breaking changes, see `0.10.0 migration