Changelog

This page keeps a detailed human friendly rendering of what’s new and changed in specific versions. Please see Version Guarantees for more information.

v2.10.0a [UNRELEASED]

Deprecations

New Features

Bug Fixes

Documentation

Miscellaneous

  • Update the python -m disnake newcog template to include all missing special methods. (#808)

  • Overhaul and simplify contribution guide. (#1098)

  • [ext.commands] Rewrite slash command signature evaluation to use the same mechanism as prefix command signatures. This should not have an impact on user code, but streamlines future changes. (#1116)

  • Start testing with Python 3.12 in CI. (#1117)

  • Add StandardSticker to stickers parameter type annotation of Messageable.send() and ForumChannel.create_thread(). (#1134)

  • Reduce the amount of unknown (unresolved) types in public-facing APIs. (#1167)

v2.9.1

Bug Fixes

  • Allow cls argument in select menu decorators (e.g. ui.string_select()) to be specified by keyword instead of being positional-only. (#1111)

  • [ext.commands] Fix edge case in evaluation of multiple identical annotations with forwardrefs in a single signature. (#1120)

  • Fix Thread.permissions_for() not working in some cases due to an incorrect import. (#1123)

Documentation

v2.9.0

This release comes with support for the new username system, text in stage, role subscriptions, silent messages, and onboarding. The documentation has been updated, splitting the monolithic API Reference page into smaller pages.

See below for a complete list of changes.

Deprecations

  • AutoModTriggerType.harmful_link is obsolete, it is now enabled Discord-wide. (#986)

  • The PartyType enum is deprecated, as voice activity IDs are not officially documented and the enum regularly becomes outdated. (#1035)

  • [ext.commands] Range and String now require a type argument (i.e. Range[int, 1, 5] instead of Range[1, 5], similarly with String[str, 2, 4]). The old form is deprecated. (#991)

  • [ext.commands] The mypy plugin is now a no-op. It was previously used for supporting Range[] and String[] annotations. (#991)

New Features

Bug Fixes

Documentation

  • Split the monolithic API Reference pages into multiple sub-references. (#392)
    • Main disnake API reference can now be found at API Reference.

    • disnake.ext.commands API reference is now under Commands API Reference.

    • Legacy api.html and ext/commands/api.html pages are deprecated.

      • Links with pre-existing references (eg /api.html#disnake.AppInfo) will be redirected to their appropriate page.

  • Update automod rule limits. (#931)

  • Remove incorrect documentation for InvokableApplicationCommand.invoke(). (#961)

  • Add a searchbox for filtering the sidebar on the API Reference pages. (#963)

  • Clarify docs about the on_member_update() and on_raw_member_update() events. (#992)

  • Remove pins() method from unsupported channel types. (#1033)

  • Update “Creating a Bot Account” page with newer images and synchronise info according to latest changes made by Discord. (#1039)

  • Add note to GuildChannel.create_invite and all subclasses about the new 30 day expiration limit imposed for non-community guilds. (#1056)

  • [ext.commands] Fix commands extension events being duplicated in search results. (#944)

Miscellaneous

  • Change dependency and environment management to use pdm. (#836, #953)

    Please check CONTRIBUTING.md for more details.

  • Change the main linter to ruff instead of flake8. (#935)

  • Update Sphinx to v7.0.1. (#936, #1020)

  • Support PyNaCl v1.5. (#968)

  • Remove disnake.utils.parse_token() (never documented), which has been broken for newer tokens for some time, and was based on unofficial information about the token structure. (#990)

  • Update typings of Message.activity and internal Team payloads to match API documentation. (#996)

  • Increase the default Guild.filesize_limit from 8MB to 25MB, matching the recent increase by Discord. (#1005)

v2.8.2

This maintainence release contains backports from v2.9.0.

Bug Fixes

Miscellaneous

v2.8.1

Bug Fixes

  • Fix VoiceClient not continuing to play audio when moving between channels. (#845)

  • Fix KeepAlive logging un-intentionally attempting to interpolate stack trace logger calls (#940)

  • Fix attribute error when attempting to access DMChannel.flags under certain circumstances. (#960)

  • Fix voice connection discovery using incorrect packet sizes. (#967)

Documentation

  • Update automod rule limits. (#931)

v2.8.0

This release comes with support for NSFW application commands, the on_audit_log_entry_create() event, and a new Event enum for use with methods like Client.wait_for().

Breaking Changes

New Features

Bug Fixes

Documentation

  • Enable OpenSearch, allowing easy integration of the search functionality into browsers. (#859)

  • Clarify types of optional Invite attributes. (#864)

  • Remove documentation regarding private threads requiring boosts. (#872)

  • Update AutoModTriggerMetadata field limits. (#877)

Miscellaneous

  • Declare a PEP 517 build backend in pyproject.toml, and use PEP 621 to define most package metadata. (#830)

v2.7.2

Bug Fixes

  • Fix VoiceClient not continuing to play audio when moving between channels. (#845)

  • Fix KeepAlive logging un-intentionally attempting to interpolate stack trace logger calls (#940)

  • Fix attribute error when attempting to access DMChannel.flags under certain circumstances. (#960)

  • Fix voice connection discovery using incorrect packet sizes. (#967)

v2.7.1

Bug Fixes

v2.7.0

This release comes with support for python 3.11 and new selects.

Breaking Changes

  • Properly document that Message.system_content may return None. While this is documented as a breaking change, this function always could return None if the message type was not recognised. (#766)

  • Rename InteractionDataResolved.get() to get_by_id(). (#814)

Deprecations

New Features

Bug Fixes

  • Add the missing attributes for PermissionOverwrite: use_application_commands and use_embedded_activities. (#777)

  • Ensure that embed fields are copied properly by Embed.copy() and that the copied embed is completely separate from the original one. (#792)

  • Fix an issue with Member.ban() erroring when the delete_message_days parameter was provided. (#810)

  • Try to get threads used in interactions (like threads in command arguments) from the cache first, before creating a new instance. (#814)

  • Fix creation of threads in text channels without Permissions.manage_threads. (#818)

  • Fix off-by-one error in AutoModKeywordPresets values. (#820)

  • Update event loop handling to avoid warnings when running on Python 3.11. (#827)

  • [ext.commands] Fix a case where optional variadic arguments could have infinite loops in parsing depending on the user input. (#825)

Documentation

  • Speed up page load by changing hoverxref tooltips to be lazily loaded. (#393)

  • Remove reference to the v1.0 migration guide from the main index page, and move legacy changelogs to a separate page. (#697)

  • Update sphinx from version 5.1 to 5.3. (#764, #821)

  • Add a note warning mentioning that using a disnake.File object as file kwarg makes a disnake.Embed not reusable. (#786)

  • Update broken Discord API Docs links, add :ddocs: role for easily creating links to the API documentation. (#793)

  • Add a custom 404 page for when the navigated page does not exist. (#797)

Miscellaneous

  • Increase the upper bound for the aiohttp dependency from <3.9 to <4. (#789)

  • Use importlib.metadata instead of the deprecated pkg_resources in the cli for displaying the version. (#791)

  • [ext.commands] Add missing py.typed marker. (#784)

  • [ext.tasks] Add missing py.typed marker. (#784)

v2.6.3

This maintainence release contains backports from v2.8.0.

Bug Fixes

v2.6.2

This maintainence release contains backports from v2.7.0.

Bug Fixes

v2.6.1

This maintainence release contains backports from v2.7.0.

Bug Fixes

  • Ensure that embed fields are copied properly by Embed.copy() and that the copied embed is completely separate from the original one. (#792)

  • Fix an issue with Member.ban() erroring when the delete_message_days parameter was provided. (#810)

v2.6.0

This release adds support for new forum channel features (like tags) as well as auto moderation, among other things. See below for more.

Also note the breaking changes listed below, which may require additional code changes.

Breaking Changes

Deprecations

  • EmptyEmbed and Embed.Empty are deprecated in favor of None, have been removed from the documentation, and will result in type-checking errors. (#435, #768)

  • The delete_message_days parameter of Guild.ban() and Member.ban() is deprecated in favour of clean_history_duration. (#659)

  • [ext.commands] Using command_prefix=None with Bot is now deprecated in favour of InteractionBot. (#689)

New Features

Bug Fixes

  • Update incorrect channel edit method annotations. (#418)
    • Fix sync_permissions parameter type.

    • Remove topic parameter from StageChannel.edit(), add bitrate.

  • Properly close sockets when receiving a voice server update event. (#488)

  • Warn the user that bools are not supported for default_member_permissions. (#520)

  • Update the Guild Iterator to not get stuck in an infinite loop. (#526)
    • Add a missing import for the scheduled event user iterator.

  • Change the default guild GuildSticker limit to 5. (#531)

  • Handle optional Locale instances (no longer create an enum value). (#533)

  • Update the type field handling for audit logs. (#535)
  • Dispatch disnake.on_reaction_remove() for Thread instances. (#536)

  • Update Guild.bitrate_limit to use the correct value for the VIP_REGIONS feature flag. (#538)

  • Handle ThreadAutoArchiveDuration instances for default_auto_archive_duration when editing channels. (#568)

  • Assume that None is an empty channel name and keep channel.name a string. (#569)

  • Remove the $ prefix from IDENTIFY payload properties. (#572)

  • Replace old application command objects in cogs with the new/copied objects. (#575)

  • Fix opus function calls on arm64 macOS. (#620)

  • Improve channel/guild fallback in resolved interaction data, using PartialMessageable for unhandled/unknown channels instead of using None. (#646)

  • Check the type of the provided parameter when validating names to improve end-user errors when passing an incorrect object to slash command and option names. (#653)

  • Make the ext.commands.default_member_permissions() decorator always work in cogs. (#678)

  • Fix Spotify.start, Spotify.end, Spotify.duration raising KeyError instead of returning None, improve activity typing. (#685)

  • Fixes message initialization failing with threads and no intents by explicitly checking we have a guild object where one is required. (#699, #712)

  • Fixed an issue where it would be possible to remove other features when enabling or disabling the COMMUNITY feature for a Guild. (#705)

  • Fix invalid widget fields. (#736)
  • No longer use deprecated @! syntax for mentioning users. (#743)

  • Fix creation of forum threads without Permissions.manage_threads. (#746)

  • Don’t count initial message in forum threads towards Thread.message_count and Thread.total_message_sent. (#747)

  • [ext.commands] Handle VoiceChannel in commands.is_nsfw(). (#536)

  • [ext.commands] Handle Union[User, Member] annotations on slash commands arguments when using the decorator interface. (#584)

  • [ext.commands] Change has_permissions and bot_has_permissions checks to work with interations in guilds that only added the applications.commands scope, and in DMs. (#673)

  • [ext.commands] Fix edge case with parsing command annotations that contain a union of non-type objects, like Optional[Literal[1, 2, 3]]. (#770)

Documentation

Miscellaneous

  • Refactor the test bot to be easier to use for all users. (#247)

  • Refactor channel edit overloads and internals, improving typing. (#418)

  • Run pyright on examples and fix any typing issues uncovered by this change. (#519)

  • Add initial testing framework. (#529)

  • Explicitly type activity types with literal return values. (#543)

  • Explicitly type channel types with literal return values. (#543)

  • Update PyPI url and minor wording in the README. (#556)

  • Add flake8 as our linter. (#557)

  • Update pyright to 1.1.254. (#559)

  • Add generic parameters to user/message command decorators. (#563)
    • Update default parameter type to improve compatibilty with callable/dynamic defaults.

  • Run docs creation in GitHub actions to test for warnings before a pull is merged. (#564)

  • Add more typing overrides to GuildCommandInteraction. (#580)

  • Rework internal typings for interaction payloads. (#588)

  • Add typings for all gateway payloads. (#594)

  • Add towncrier and sphinxcontrib-towncrier to manage changelogs. (#600)
    • Use towncrier for changelog management.

    • Use sphinxcontrib-towncrier to build changelogs for the in-development documentation.

  • Expand contributing documentation to include more information on creating pull requests and writing features. (#601)

  • Add flake8-comprehensions for catching inefficient comphrehensions. (#602)

  • Resolve minor flake8 issues. (#606)
    • Don’t use star imports except in __init__.py files.

    • Don’t use ambigious variable names.

    • Don’t use setattr and getattr with constant variable names.

  • Add flake8-pytest-style for linting pytest specific features with flake8. (#608)

  • Replace all TypeVar instances with typing_extensions.Self across the entire library where possible. (#610)

  • Remove the internal fill_with_flags decorator for flags classes and use the built in object.__init_subclass__() method. (#616, #660)

  • Add slice to ui.ActionRow __getattr__ and __delattr__ annotations. (#624)

  • Update and standardise all internal Snowflake regexes to match between 17 and 19 characters (inclusive). (#651)

  • Rename internal module disnake.ext.commands.flags to disnake.ext.commands.flag_converter. (#667)

  • Improve parallel documentation build speed. (#690)

  • Limit installation of cchardet in the [speed] extra to Python versions below 3.10 (see aiohttp#6857). (#702)

  • Update annotation and description of options parameter of ui.ActionRow.add_select to match ui.Select. (#744)

  • Update typings to explicitly specify optional types for parameters with a None default. (#751)

  • Adopt SPDX License Headers across all project files. (#756)

v2.5.3

This is a maintenance release with backports from v2.6.0.

Bug Fixes

Miscellaneous

  • Limit installation of cchardet in the [speed] extra to Python versions below 3.10 (see aiohttp#6857). (#772)

v2.5.2

This release is a bugfix release with backports from upto v2.6.0.

Bug Fixes

  • Warn the user that bools are not supported for default_member_permissions. (#520)

  • Update the Guild Iterator to not get stuck in an infinite loop. (#526)
    • Add a missing import for the scheduled event user iterator.

  • Change the default guild GuildSticker limit to 5. (#531)

  • Handle optional Locale instances (no longer create an enum value). (#533)

  • [ext.commands] Handle VoiceChannel in commands.is_nsfw(). (#536)

  • Dispatch disnake.on_reaction_remove() for Thread instances. (#536)

  • Update Guild.bitrate_limit to use the correct value for the VIP_REGIONS feature flag. (#538)

  • Make all *InteractionData dataclasses dicts (MessageInteractionData, ApplicationCommandInteractionData, and so on). (#549)

  • Handle ThreadAutoArchiveDuration instances for default_auto_archive_duration when editing channels. (#568)

  • Assume that None is an empty channel name and keep channel.name a string. (#569)

  • Remove the $ prefix from IDENTIFY payload properties. (#572)

  • Replace old application command objects in cogs with the new/copied objects. (#575)

  • [ext.commands] Handle Union[User, Member] annotations on slash commands arguments when using the decorator interface. (#584)

  • Fix opus function calls on arm64 macOS. (#620)

  • Improve channel/guild fallback in resolved interaction data, using PartialMessageable for unhandled/unknown channels instead of using None. (#646)

Documentation

v2.5.1

Bug Fixes

v2.5.0

This version adds support for API v10 (which comes with a few breaking changes), forum channels, localizations, permissions v2, improves API coverage by adding support for previously missing features like guild previews, widgets, or welcome screens, and contains several miscellaneous enhancements and bugfixes.

Regarding the message content intent: Note that earlier versions will continue working fine after the message content intent deadline (August 31st 2022), as long as the intent is enabled in the developer portal. However, from this version (2.5.0) onward, the intent needs to be enabled in the developer portal and your code. See this page of the guide for more information. If you do not have access to the intent yet, you can temporarily continue using API v9 by calling disnake.http._workaround_set_api_version(9) before connecting, which will keep sending message content before the intent deadline, even with the intent disabled.

Breaking Changes

  • The message_content intent is now required to receive message content and related fields, see above (#353)

  • The new permissions v2 system revamped application command permissions, with the most notable changes being the removal of default_permission and commands.guild_permissions in favor of new fields/methods - see below for all new changes (#405)

  • TextChannel.create_thread() now requires either a message or a type parameter (#355)

  • GuildScheduledEvent.fetch_users() and Guild.bans() now return an async iterator instead of a list of users (#428, #442)

  • Guild.audit_logs() no longer supports the oldest_first parameter (#473)

  • Store channels have been removed as they’re not supported by Discord any longer (#438)

  • on_thread_join() will no longer be invoked when a new thread is created, see on_thread_create() (#445)

  • The voice region enum was replaced with a generic VoiceRegion data class (#477)

  • locale attributes are now of type Locale instead of str (#439)

  • Invite.revoked and Thread.archiver_id have been removed (deprecated in 2.4) (#455)

  • Slash command names and option names are no longer automatically converted to lowercase, an InvalidArgument exception is now raised instead (#422)

  • The interaction parameter of ui.Item.callback() can no longer be passed as a kwarg (#311)

  • The youtube, awkword and sketchy_artist PartyTypes no longer work and have been removed (#408, #409)

  • Trying to defer an interaction response that does not support deferring (e.g. autocomplete) will now raise a TypeError (#505)

  • [ext.commands] Failure to convert an input parameter annotated as LargeInt now raises a LargeIntConversionFailure (#362)

Deprecations

New Features

Bug Fixes

Documentation

Miscellaneous

  • Fix remaining pyright issues, add pyright CI (#311, #387, #514)

  • Update dev dependencies and CI (#345, #386, #451)

  • Improve _WebhookState typing (#391)

  • Improve basic_bot.py example (#399)

  • Add low-level component example (#452)

  • Update Discord server invite links (#476)

v2.4.1

This release is a bugfix release with backports from v2.5.0 up to v2.5.2.

Bug Fixes

Documentation

  • Update the requests intersphinx url to the new url of the requests documentation. (#539)

Miscellaneous

  • Update dev dependencies and CI (#451)

v2.4.0

This version contains many new features, including attachment options, modals, and the ability to directly send message components without views, as well as several fixes and other general improvements.

Breaking Changes

  • The constructor of ApplicationCommand and its subtypes no longer accepts **kwargs for setting internal values (#249)
    • This shouldn’t affect anyone, as **kwargs was only used for setting fields returned by the API and had no effect if the user set them

  • Interaction.permissions now returns proper permission values in DMs (#321)

  • The reason parameter for sticker endpoints in HTTPClient is now kwarg-only

Deprecations

  • Thread.archiver_id is not being provided by the API anymore and will be removed in a future version (#295)

  • Invite.revoked is not being provided by the API anymore and will be removed in a future version (#309)

New Features

Bug Fixes

Documentation

  • Show tooltips when hovering over links (#236, #242)

  • General content improvements/adjustments (#275)

  • Slight redesign and general layout improvements (#278)

Miscellaneous

  • Improve examples (#209, #262, #270, #307, #332, #341)

  • Improve typing/annotations of several parts of the library (#249, #256, #263, #279, #292, #299, #308)

  • Add additional pre-commit hooks for development (#233)

  • Add taskipy for development (#234)

  • Improve member deserialization (#304)

  • Split application command objects into separate types for data returned by the API (#299)

  • Update README banner (#343)

v2.3.2

Bug Fixes

  • Fix invalid default value for application command option descriptions (#338)

v2.3.1

Bug Fixes

Documentation

  • Fix guild_permissions() documentation

  • Fix missing dropdown icon (#235)

Miscellaneous

  • Add isort and black pre-commit hooks, run isort (#169, #173, #233)

  • Rename tests directory (#232)

v2.3.0

This version contains several new features and fixes, notably support for guild scheduled events, guild timeouts, and a slash command rework with parameter injections, as well as several documentation fixes.

Note: the Version Guarantees have been updated to more accurately reflect the versioning scheme this library is following.

Breaking Changes

  • The supported aiohttp version range changed from >=3.6.0,<3.8.0 to >=3.7.0,<3.9.0

  • Due to the upcoming text-in-voice feature (not yet released at the time of writing), many methods/properties that previously returned a TextChannel can now also return a VoiceChannel, which shares many but not all of its methods. Also see the details for text-in-voice under “New Features” below, which include a few important things to note.

  • Slash command internals have undergone an extensive rework, and while existing code should still work as before, it is recommended that you do some testing using the new implementation first

  • Bot.get_slash_command may now also return SubCommandGroup or SubCommand instances, see documentation

  • disnake.types.ThreadArchiveDuration is now ThreadArchiveDurationLiteral, to avoid confusion with the new ThreadArchiveDuration enum

Deprecations

  • The role_ids and user_ids parameters for guild_permissions are now roles and users respectively; the old parameter names will be removed in a future version

New Features

Bug Fixes

  • Fix dispatch of typing events in DMs (#176)

  • Try to retrieve objects in received interactions from cache first (fixing properties like Member.status on member parameters for commands) (#182, #213)

  • Fix return type annotation of ui.button() and ui.select() decorators (#163)

  • Fix incorrect URL returned by Template.url

  • Fix sending local files in embeds with interactions/webhooks if only one embed was specified (#193)

  • Fix leftover uses of json, which didn’t use orjson if available (#184)

  • Fix Message.channel type being DMChannel for ephemeral messages in on_message() (#197)

  • Fix command/option name validation (#210)

  • Always close files after completing HTTP requests (#124)

  • [ext.commands] Fix unnecessary application command sync without changes

  • [ext.commands] Fix incorrect detection of deprecated guild commands in sync algorithm while sync is in progress (#205)

Documentation

Miscellaneous

  • Add Python 3.10 to package classifiers (#127)

  • Change supported aiohttp version range from >=3.6.0,<3.8.0 to >=3.7.0,<3.9.0 (#119, #164)

  • Add guide for configuring inviting a bot through its profile (#153)

  • Rewrite project README (#191)

  • Improve examples (#143)

v2.2.3

Bug Fixes

  • Fix invalid default value for application command option descriptions (#338)

v2.2.2

Bug Fixes

  • Fix channel conversion in audit log entries

  • Fix improper error handling in context menu commands

  • Supply ApplicationCommandInteraction.application_command in autocomplete callbacks

  • Fix Select.append_option not raising an error if 25 options have already been added

  • Improve check for options parameter on slash commands and subcommands

  • Improve parameter parsing for converters

  • Fix warning related to new option properties

Documentation

v2.2.1

Bug Fixes

  • Fixed error related to guild member count

v2.2.0

New Features

v2.1.5

New Features

Bug Fixes

  • Command deletions on reconnections

  • Pending sync tasks on loop termination

v2.1.4

Bug Fixes

  • Fixed some issues with application command permissions synchronisation

v2.1.3

New Features

Bug Fixes

  • Music

  • default_permission kwarg in user / message commands

  • Commands no longer sync during the loop termination

v2.1.2

This is the first stable version of this discord.py 2.0 fork.

New Features

Legacy Changelog

Changelogs for older versions (0.x, 1.x) can be found on the Legacy Changelog page.