Changelog

This page keeps a detailed human friendly rendering of what’s new and changed in specific versions.

v2.1.0

Due to the enormous amount of changes in this release, some minor changes may be omitted from this changelog. Please refer to the documentation for more details on specific features.

New Features

Bug Fixes

  • Fix TLS fingerprinting issues causing unnecessary CAPTCHA challenges and blocked requests

  • Fix the type of ClientUser.phone to be a string

  • Fix various state issues when managing guild subscriptions

  • [BREAKING] Remove no longer functional validate parameter from abc.GuildChannel.create_invite()

  • Improve presence syncing to reduce unnecessary updates and lost presences

  • [BREAKING] Update return type of Client.detectable_applications() to fix a crash due to an API change

  • [BREAKING] Remove nonexistant Gift.revoked attribute

  • [BREAKING] Rename Guild.owner_application_id to Guild.application_id to match API and upstream

  • [BREAKING] Remove no longer functional Guild.application_command_counts attribute

  • Fix crash in Integration with the Twitch integration ID being a string

  • Improve member and relationship presence support and handling

  • Fix FileHandler handlers being written ANSI characters when the bot is executed inside PyCharm
    • This has the side effect of removing coloured logs from the PyCharm terminal due an upstream bug involving TTY detection. This issue is tracked under PY-43798

  • Fix channel edits with Webhook.edit() sending two requests instead of one

  • Fix StageChannel.last_message_id always being None

  • Fix piped audio input ending prematurely

  • Fix AutoMod audit log entry error due to empty channel_id

  • Fix handling of around parameter in abc.Messageable.history()

  • Fix utils.escape_markdown() not escaping the new markdown

  • Fix webhook targets not being converted in audit logs

  • Fix error when not passing enabled in Guild.create_automod_rule()

  • Fix how various parameters are handled in Guild.create_scheduled_event()

  • Fix not sending the ssrc parameter when sending the SPEAKING voice payload

  • Fix username lookup in Guild.get_member_named()

  • Fix false positives in PartialEmoji.from_str() inappropriately setting animated to True

  • Fix NameError when using abc.GuildChannel.create_invite()

  • Fix escape behaviour for lists and headers in escape_markdown()

  • Fixes and improvements for FFmpegAudio and all related subclasses

  • Fix Template.source_guild() attempting to resolve from cache

  • Fix IndexError being raised instead of ValueError when calling Colour.from_str() with an empty string

  • Fix possible error in voice cleanup logic

  • Fix possible bad voice state where you move to a voice channel with missing permissions

  • Fix handling of AuditLogDiff when relating to auto mod triggers

  • Fix race condition in voice logic relating to disconnect and connect

  • Fix restriction on auto moderation audit log ID range

  • Fix comparison between Object classes with a type set

  • Fix handling of an enum in AutoModRule.edit()

  • Fix handling of Client.close() within Client.__aexit__()

  • Fix channel deletion not evicting related threads from cache

  • Fix bug with cache superfluously incrementing role positions

  • Fix exempt_channels not being passed along in Guild.create_automod_rule()

  • Fix abc.GuildChannel.purge() failing if the message was deleted

  • Handle improper 1000 close code closures by Discord

  • Add support for AEAD XChaCha20 Poly1305 encryption model
    • This allows voice to continue working when the older encryption modes eventually get removed

  • Update all channel clone implementations to work as expected

  • Fix TextChannel.clone() always sending slowmode when not applicable to news channels

  • Fix Sticker.url for GIF stickers

  • Fix User.default_avatar for team users and webhooks

  • Fix AuditLogEntry.target causing errors for AuditLogAction.message_pin and AuditLogAction.message_unpin actions

  • Fix path sanitisation for absolute Windows paths when using __main__

  • Create ScheduledEvent on cache miss for on_scheduled_event_delete()

  • Add defaults for Message creation preventing some crashes

  • Fix voice connection issues and upgrade the voice version to 8

  • Fix calculation of hashed rate limit keys

  • Fix Thread.applied_tags being empty for media channels

  • Fix potentially stuck ratelimit buckets in certain circumstances

  • Fix audit log automod_rule_trigger_type extra being missing

  • [ext.tasks] Fix race condition when setting timer handle when using uvloop

  • [ext.commands] Fix issue with category cooldowns outside of guild channels

  • [ext.commands] Fix callable FlagConverter defaults on hybrid commands not being called

  • [ext.commands] Unwrap Parameter if given as default to parameter()

  • [ext.commands] Fix fallback behaviour not being respected when calling replace for Parameter

  • [ext.commands] Fix HelpCommand defined checks not carrying over during copy

  • [ext.commands] Fix the wrong on_help_command_error() being called when ejected from a cog

  • [ext.commands] Fix =None being displayed in signature

  • [ext.commands] Change lookup order for MemberConverter and UserConverter to prioritise usernames instead of nicknames

Miscellaneous

  • Minimum version is now Python 3.10

  • New dependency: curl_cffi

  • Update filesize limit constants

  • Additional documentation added for logging capabilities

  • Performance increases of constructing Permissions using keyword arguments

  • Improve __repr__ of SyncWebhook and Webhook

  • Change internal thread names to be consistent

  • Use a fallback package for audioop to allow the library to work in Python 3.13 or newer

  • Remove aiodns from being used on Windows

  • Add zstd gateway compression to speed extras
    • This can be installed using discord.py-self[speed]

  • Add proxy support fetching from the CDN

  • Remove / from being safe from URI encoding when constructing paths internally

  • Sanitize invite argument before calling the invite info endpoint

  • Avoid returning in finally in specific places to prevent exception swallowing

  • Deprecate the with_expiration parameter in Client.fetch_invite()

  • Allow creating NSFW voice/stage channels

  • The Invite is now returned when using Invite.delete() or Client.delete_invite()

  • Update PyNaCl minimum version dependency

  • AppCommandType is now ApplicationCommandType for consistency; the old name is still available as an alias

  • AppCommandOptionType is now ApplicationCommandOptionType for consistency; the old name is still available as an alias

  • [BREAKING] Remove all achievement support as the endpoints have been removed by Discord

  • [BREAKING] Updated CAPTCHA handler implementation
    • The old CaptchaHandler class has been removed

    • New interface is via the captcha_handler parameter in Client, which accepts a CaptchaRequired class instance and the Client itself as parameters

    • You can also override Client.handle_captcha() in a subclass

  • [BREAKING] Swap all exclude_* parameters in fetch methods to include_* parameters for consistency

v2.0.0

This is considered the initial stable version. All previous versions were mostly a stepping stone to this one. The changes are too enormous to list here, so please check out the rest of the documentation.