Changelog

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

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

v1.7.3

Bug Fixes

v1.7.2

Bug Fixes

v1.7.1

Bug Fixes

v1.7.0

This version is mainly for improvements and bug fixes. This is more than likely the last major version in the 1.x series. Work after this will be spent on v2.0. As a result, this is the last version to support Python 3.5. Likewise, this is the last version to support user bots.

Development of v2.0 will have breaking changes and support for newer API features.

New Features

Bug Fixes

Miscellaneous

  • User endpoints and all userbot related functionality has been deprecated and will be removed in the next major version of the library.

  • Permission class methods were updated to match the UI of the Discord client (#6476)

  • _ and - characters are now stripped when making a new cog using the disnake package (#6313)

v1.6.0

This version comes with support for replies and stickers.

New Features

Bug Fixes

Miscellaneous

v1.5.1

Bug Fixes

  • Fix utils.escape_markdown() not escaping quotes properly (#5897)

  • Fix Message not being hashable (#5901, #5866)

  • Fix moving channels to the end of the channel list (#5923)

  • Fix seemingly strange behaviour in __eq__ for PermissionOverwrite (#5929)

  • Fix aliases showing up in __iter__ for Intents (#5945)

  • Fix the bot disconnecting from voice when moving them to another channel (#5904)

  • Fix attribute errors when chunking times out sometimes during delayed on_ready dispatching.

  • Ensure that the bot’s own member is not evicted from the cache (#5949)

Miscellaneous

  • Members are now loaded during GUILD_MEMBER_UPDATE events if MemberCacheFlags.joined is set. (#5930)

  • [ext.commands] MemberConverter now properly lazily fetches members if not available from cache.
    • This is the same as having disnake.Member as the type-hint.

  • Guild.chunk() now allows concurrent calls without spamming the gateway with requests.

v1.5.0

This version came with forced breaking changes that Discord is requiring all bots to go through on October 7th. It is highly recommended to read the documentation on intents, A Primer to Gateway Intents.

API Changes

  • Members and presences will no longer be retrieved due to an API change. See Privileged Intents for more info.

  • As a consequence, fetching offline members is disabled if the members intent is not enabled.

New Features

Bug Fixes

  • Fix issue with Guild.by_category() not showing certain channels.

  • Fix abc.GuildChannel.permissions_synced always being False (#5772)

  • Fix handling of cloudflare bans on webhook related requests (#5221)

  • Fix cases where a keep-alive thread would ack despite already dying (#5800)

  • Fix cases where a Member reference would be stale when cache is disabled in message events (#5819)

  • Fix allowed_mentions not being sent when sending a single file (#5835)

  • Fix overwrites being ignored in abc.GuildChannel.edit() if {} is passed (#5756, #5757)

  • [ext.commands] Fix exceptions being raised improperly in command invoke hooks (#5799)

  • [ext.commands] Fix commands not being properly ejected during errors in a cog injection (#5804)

  • [ext.commands] Fix cooldown timing ignoring edited timestamps.

  • [ext.tasks] Fix tasks extending the next iteration on handled exceptions (#5762, #5763)

Miscellaneous

  • Webhook requests are now logged (#5798)

  • Remove caching layer from AutoShardedClient.shards. This was causing issues if queried before launching shards.

  • Gateway rate limits are now handled.

  • Warnings logged due to missed caches are now changed to DEBUG log level.

  • Some strings are now explicitly interned to reduce memory usage.

  • Usage of namedtuples has been reduced to avoid potential breaking changes in the future (#5834)

  • [ext.commands] All BadArgument exceptions from the built-in converters now raise concrete exceptions to better tell them apart (#5748)

  • [ext.tasks] Lazily fetch the event loop to prevent surprises when changing event loop policy (#5808)

v1.4.2

This is a maintenance release with backports from v1.5.0.

Bug Fixes

  • Fix issue with Guild.by_category() not showing certain channels.

  • Fix abc.GuildChannel.permissions_synced always being False (#5772)

  • Fix handling of cloudflare bans on webhook related requests (#5221)

  • Fix cases where a keep-alive thread would ack despite already dying (#5800)

  • Fix cases where a Member reference would be stale when cache is disabled in message events (#5819)

  • Fix allowed_mentions not being sent when sending a single file (#5835)

  • Fix overwrites being ignored in abc.GuildChannel.edit() if {} is passed (#5756, #5757)

  • [ext.commands] Fix exceptions being raised improperly in command invoke hooks (#5799)

  • [ext.commands] Fix commands not being properly ejected during errors in a cog injection (#5804)

  • [ext.commands] Fix cooldown timing ignoring edited timestamps.

  • [ext.tasks] Fix tasks extending the next iteration on handled exceptions (#5762, #5763)

Miscellaneous

  • Remove caching layer from AutoShardedClient.shards. This was causing issues if queried before launching shards.

  • [ext.tasks] Lazily fetch the event loop to prevent surprises when changing event loop policy (#5808)

v1.4.1

Bug Fixes

  • Properly terminate the connection when Client.close() is called (#5207)

  • Fix error being raised when clearing embed author or image when it was already cleared (#5210, #5212)

  • Fix __path__ to allow editable extensions (#5213)

v1.4.0

Another version with a long development time. Features like Intents are slated to be released in a v1.5 release. Thank you for your patience!

New Features

Bug Fixes

Miscellaneous

v1.3.4

Bug Fixes

  • Fix an issue with channel overwrites causing multiple issues including crashes (#5109)

v1.3.3

Bug Fixes

  • Change default WS close to 4000 instead of 1000.
    • The previous close code caused sessions to be invalidated at a higher frequency than desired.

  • Fix None appearing in Member.activities. (#2619)

v1.3.2

Another minor bug fix release.

Bug Fixes

  • Higher the wait time during the GUILD_CREATE stream before on_ready is fired for AutoShardedClient.

  • on_voice_state_update() now uses the inner member payload which should make it more reliable.

  • Fix various Cloudflare handling errors (#2572, #2544)

  • Fix crashes if Message.guild is Object instead of Guild.

  • Fix Webhook.send() returning an empty string instead of None when wait=False.

  • Fix invalid format specifier in webhook state (#2570)

  • [ext.commands] Passing invalid permissions to permission related checks now raises TypeError.

v1.3.1

Minor bug fix release.

Bug Fixes

  • Fix fetching invites in guilds that the user is not in.

  • Fix the channel returned from Client.fetch_channel() raising when sending messages. (#2531)

Miscellaneous

  • Fix compatibility warnings when using the Python 3.9 alpha.

  • Change the unknown event logging from WARNING to DEBUG to reduce noise.

v1.3.0

This version comes with a lot of bug fixes and new features. It’s been in development for a lot longer than was anticipated!

New Features

Bug Fixes

Miscellaneous

  • The library now fully supports Python 3.8 without warnings.

  • Bump the dependency of websockets to 8.0 for those who can use it. (#2453)

  • Due to Discord providing Member data in mentions, users will now be upgraded to Member more often if mentioned.

  • utils.escape_markdown() now properly escapes new quote markdown.

  • The message cache can now be disabled by passing None to max_messages in Client.

  • The default message cache size has changed from 5000 to 1000 to accommodate small bots.

  • Lower memory usage by only creating certain objects as needed in Role.

  • There is now a sleep of 5 seconds before re-IDENTIFYing during a reconnect to prevent long loops of session invalidation.

  • The rate limiting code now uses millisecond precision to have more granular rate limit handling.
    • Along with that, the rate limiting code now uses Discord’s response to wait. If you need to use the system clock again for whatever reason, consider passing assume_synced_clock in Client.

  • The performance of Guild.default_role has been improved from O(N) to O(1). (#2375)

  • The performance of Member.roles has improved due to usage of caching to avoid surprising performance traps.

  • The GC is manually triggered during things that cause large deallocations (such as guild removal) to prevent memory fragmentation.

  • There have been many changes to the documentation for fixes both for usability, correctness, and to fix some linter errors. Thanks to everyone who contributed to those.

  • The loading of the opus module has been delayed which would make the result of opus.is_loaded() somewhat surprising.

  • [ext.commands] Usernames prefixed with @ inside DMs will properly convert using the User converter. (#2498)

  • [ext.tasks] The task sleeping time will now take into consideration the amount of time the task body has taken before sleeping. (#2516)

v1.2.5

Bug Fixes

  • Fix a bug that caused crashes due to missing animated field in Emoji structures in reactions.

v1.2.4

Bug Fixes

v1.2.3

Bug Fixes

v1.2.2

Bug Fixes

  • Audit log related attribute access have been fixed to not error out when they shouldn’t have.

v1.2.1

Bug Fixes

  • User.avatar_url and related attributes no longer raise an error.

  • More compatibility shims with the enum.Enum code.

v1.2.0

This update mainly brings performance improvements and various nitro boosting attributes (referred to in the API as “premium guilds”).

New Features

Bug Fixes

Miscellaneous

  • 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.

  • Improve performance of message creation by about 1.5x.

  • Improve performance of message editing by about 1.5-4x depending on payload size.

  • Improve performance of attribute access on Member about by 2x.

  • Improve performance of utils.get() by around 4-6x depending on usage.

  • Improve performance of event parsing lookup by around 2.5x.

  • Keyword arguments in Client.start() and Client.run() are now validated (#953, #2170)

  • The Discord error code is now shown in the exception message for HTTPException.

  • Internal tasks launched by the library will now have their own custom __repr__.

  • All public facing types should now have a proper and more detailed __repr__.

  • [ext.tasks] Errors are now logged via the standard logging module.

v1.1.1

Bug Fixes

  • Webhooks do not overwrite data on retrying their HTTP requests (#2140)

Miscellaneous

  • Add back signal handling to Client.run() due to issues some users had with proper cleanup.

v1.1.0

New Features

disnake.ext.commands

Bug Fixes

disnake.ext.commands

  • 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.

  • Fix the default on_command_error() to work with new-style cogs (#2094)

  • DM channels are now recognised as NSFW in is_nsfw() check.

  • Fix race condition with help commands (#2123)

  • Fix cog descriptions not showing in MinimalHelpCommand (#2139)

Miscellaneous

  • Improve the performance of internal enum creation in the library by about 5x.

  • Make the output of python -m disnake --version a bit more useful.

  • The loop cleanup facility has been rewritten again.

  • The signal handling in Client.run() has been removed.

disnake.ext.commands

  • Custom exception classes are now used for all default checks in the library (#2101)

v1.0.1

Bug Fixes

  • 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 (#2056, #2063)

v1.0.0

The changeset for this version are too big to be listed here, for more information please see the migrating page.

v0.16.6

Bug Fixes

  • Fix issue with 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.

  • Fix race condition when pre-emptively rate limiting that caused releasing an already released lock.

  • Fix invalid state errors when immediately cancelling a coroutine.

v0.16.1

This release is just a bug fix release with some better rate limit implementation.

Bug Fixes

  • 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.

  • Event loop is now properly propagated (#420)

  • Allow falsey values in Client.send_message() and Client.send_file().

v0.16.0

New Features

  • Add Channel.overwrites to get all the permission overwrites of a channel.

  • Add Server.features to get information about partnered servers.

Bug Fixes

  • Timeout when waiting for offline members while triggering on_ready().

    • The fact that we did not timeout caused a gigantic memory leak in the library that caused thousands of duplicate Member instances causing big memory spikes.

  • Discard null sequences in the gateway.

    • The fact these were not discarded meant that on_ready() kept being called instead of on_resumed(). Since this has been corrected, in most cases on_ready() will be called once or twice with on_resumed() being called much more often.

v0.15.1

  • Fix crash on duplicate or out of order reactions.

v0.15.0

New Features

  • Rich Embeds for messages are now supported.

    • To do so, create your own Embed and pass the instance to the embed keyword argument to Client.send_message() or Client.edit_message().

  • Add Client.clear_reactions() to remove all reactions from a message.

  • Add support for MESSAGE_REACTION_REMOVE_ALL event, under on_reaction_clear().

  • Add Permissions.update() and PermissionOverwrite.update() for bulk permission updates.

    • This allows you to use e.g. p.update(read_messages=True, send_messages=False) in a single line.

  • Add PermissionOverwrite.is_empty() to check if the overwrite is empty (i.e. has no overwrites set explicitly as true or false).

For the command extension, the following changed:

  • Context is no longer slotted to facilitate setting dynamic attributes.

v0.14.3

Bug Fixes

  • Fix crash when dealing with MESSAGE_REACTION_REMOVE

  • Fix incorrect buckets for reactions.

v0.14.2

New Features

  • 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

  • Fix bug that disallowed None to be passed for emoji parameter in Client.wait_for_reaction().

v0.14.1

Bug fixes

  • Fix bug with Reaction not being visible at import.
    • This was also breaking the documentation.

v0.14.0

This update adds new API features and a couple of bug fixes.

New Features

  • Add support for Manage Webhooks permission under Permissions.manage_webhooks

  • Add support for around argument in 3.5+ Client.logs_from().

  • Add support for reactions.

Bug Fixes

v0.13.0

This is a backwards compatible update with new features.

New Features

  • Add the ability to manage emojis.

    • Client.create_custom_emoji() to create new emoji.

    • Client.edit_custom_emoji() to edit an old emoji.

    • Client.delete_custom_emoji() to delete a custom emoji.

  • Add new Permissions.manage_emojis toggle.

  • Add new statuses for Status.

  • Deprecate Client.change_status()

    • Use Client.change_presence() instead for better more up to date functionality.

    • This method is subject for removal in a future API version.

  • Add Client.change_presence() for changing your status with the new Discord API change.

    • This is the only method that allows changing your status to invisible or do not disturb.

Bug Fixes

  • Paginator pages do not exceed their max_size anymore (#340)

  • Do Not Disturb users no longer show up offline due to the new Status changes.

v0.12.0

This is a bug fix update that also comes with new features.

New Features

  • Add custom emoji support.

    • Adds a new class to represent a custom Emoji named Emoji

    • Adds a utility generator function, Client.get_all_emojis().

    • Adds a list of emojis on a server, Server.emojis.

    • Adds a new event, on_server_emojis_update().

  • Add new server regions to ServerRegion

    • ServerRegion.eu_central and ServerRegion.eu_west.

  • Add support for new pinned system message under MessageType.pins_add.

  • Add order comparisons for Role to allow it to be compared with regards to hierarchy.

    • This means that you can now do role_a > role_b etc to check if role_b is lower in the hierarchy.

  • Add Server.role_hierarchy to get the server’s role hierarchy.

  • Add Member.server_permissions to get a member’s server permissions without their channel specific overwrites.

  • Add Client.get_user_info() to retrieve a user’s info from their ID.

  • Add a new Player property, Player.error to fetch the error that stopped the player.

    • To help with this change, a player’s after function can now take a single parameter denoting the current player.

  • Add support for server verification levels.

    • Adds a new enum called VerificationLevel.

    • This enum can be used in Client.edit_server() under the verification_level keyword argument.

    • Adds a new attribute in the server, Server.verification_level.

  • Add Server.voice_client shortcut property for Client.voice_client_in().

    • This is technically old (was added in v0.10.0) but was undocumented until v0.12.0.

For the command extension, the following are new:

  • Add custom emoji converter.

  • All default converters that can take IDs can now convert via ID.

  • Add coroutine support for Bot.command_prefix.

  • Add a method to reset command cooldown.

Bug Fixes

  • Fix bug that caused the library to not work with the latest websockets library.

  • Fix bug that leaked keep alive threads (#309)

  • Fix bug that disallowed ServerRegion from being used in Client.edit_server().

  • Fix bug in Channel.permissions_for() that caused permission resolution to happen out of order.

  • Fix bug in Member.top_role that did not account for same-position roles.

v0.11.0

This is a minor bug fix update that comes with a gateway update (v5 -> v6).

Breaking Changes

New Features

  • Add the ability to prune members via 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 AppInfo.owner attribute.

  • Add CallMessage for group voice call messages.

  • Add GroupCall for group voice call information.

  • Add Message.system_content to get the system message.

  • Add the remaining VIP servers and the Brazil servers into ServerRegion enum.

  • Add stderr argument to VoiceClient.create_ffmpeg_player() to redirect stderr.

  • The library now handles implicit permission resolution in Channel.permissions_for().

  • Add Server.mfa_level to query a server’s 2FA requirement.

  • Add Permissions.external_emojis permission.

  • Add Member.voice attribute that refers to a VoiceState.

    • For backwards compatibility, the member object will have properties mirroring the old behaviour.

For the command extension, the following are new:

  • Command cooldown system with the cooldown decorator.

  • UserInputError exception for the hierarchy for user input related errors.

Bug Fixes

  • 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.

  • Handle cases where HEARTBEAT opcode is received. This caused bots to disconnect seemingly randomly.

For the command extension, the following bug fixes apply:

  • Bot.check decorator is actually a decorator not requiring parentheses.

  • Bot.remove_command and Group.remove_command no longer throw if the command doesn’t exist.

  • Command names are no longer forced to be lower().

  • Fix a bug where Member and User converters failed to work in private message contexts.

  • HelpFormatter now ignores hidden commands when deciding the maximum width.

v0.10.0

For breaking changes, see Migrating to v0.10.0. The breaking changes listed there will not be enumerated below. Since this version is rather a big departure from v0.9.2, this change log will be non-exhaustive.

New Features

  • The library is now fully asyncio compatible, allowing you to write non-blocking code a lot more easily.

  • The library now fully handles 429s and unconditionally retries on 502s.

  • A new command extension module was added but is currently undocumented. Figuring it out is left as an exercise to the reader.

  • Two new exception types, Forbidden and NotFound to denote permission errors or 404 errors.

  • Added Client.delete_invite() to revoke invites.

  • Added support for sending voice. Check VoiceClient for more details.

  • Added Client.wait_for_message() coroutine to aid with follow up commands.

  • Added version_info named tuple to check version info of the library.

  • Login credentials are now cached to have a faster login experience. You can disable this by passing in cache_auth=False when constructing a Client.

  • New utility function, disnake.utils.get() to simplify retrieval of items based on attributes.

  • All data classes now support !=, ==, hash(obj) and str(obj).

  • Added Client.get_bans() to get banned members from a server.

  • Added Client.invites_from() to get currently active invites in a server.

  • Added Server.me attribute to get the Member version of Client.user.

  • Most data classes now support a hash(obj) function to allow you to use them in set or dict classes or subclasses.

  • Add Message.clean_content() to get a text version of the content with the user and channel mentioned changed into their names.

  • Added a way to remove the messages of the user that just got banned in Client.ban().

  • Added Client.wait_until_ready() to facilitate easy creation of tasks that require the client cache to be ready.

  • Added Client.wait_until_login() to facilitate easy creation of tasks that require the client to be logged in.

  • Add disnake.Game to represent any game with custom text to send to Client.change_status().

  • Add Message.nonce attribute.

  • Add Member.permissions_in() as another way of doing Channel.permissions_for().

  • Add Client.move_member() to move a member to another voice channel.

  • You can now create a server via Client.create_server().

  • Added Client.edit_server() to edit existing servers.

  • Added Client.server_voice_state() to server mute or server deafen a member.

  • If you are being rate limited, the library will now handle it for you.

  • Add on_member_ban() and on_member_unban() events that trigger when a member is banned/unbanned.

Performance Improvements

  • All data classes now use __slots__ which greatly reduce the memory usage of things kept in cache.

  • Due to the usage of asyncio, the CPU usage of the library has gone down significantly.

  • A lot of the internal cache lists were changed into dictionaries to change the O(n) lookup into O(1).

  • Compressed READY is now on by default. This means if you’re on a lot of servers (or maybe even a few) you would receive performance improvements by having to download and process less data.

  • While minor, change regex from \d+ to [0-9]+ to avoid unnecessary unicode character lookups.

Bug Fixes

  • Fix bug where guilds being updated did not edit the items in cache.

  • Fix bug where member.roles were empty upon joining instead of having the @everyone role.

  • Fix bug where Role.is_everyone() was not being set properly when the role was being edited.

  • Client.logs_from() now handles cases where limit > 100 to sidestep the disnake API limitation.

  • Fix bug where a role being deleted would trigger a ValueError.

  • Fix bug where Permissions.kick_members() and Permissions.ban_members() were flipped.

  • Mentions are now triggered normally. This was changed due to the way disnake handles it internally.

  • Fix issue when a Message would attempt to upgrade a Message.server when the channel is a Object.

  • Unavailable servers were not being added into cache, this has been corrected.