Legacy Changelog¶
These are the changelogs for version 0.x and 1.x. The most recent changelogs can be found on the Changelog page.
v1.7.3¶
Bug Fixes¶
- Fix a crash involving guild uploaded stickers 
- Fix - DMChannel.permissions_for()not having- Permissions.read_messagesset.
v1.7.2¶
Bug Fixes¶
- Fix - fail_if_not_existscausing certain message references to not be usable within- abc.Messageable.send()and- Message.reply()(#6726)
- Fix - Guild.chunk()hanging when the user left the guild. (#6730)
- Fix loop sleeping after final iteration rather than before (#6744) 
v1.7.1¶
Bug Fixes¶
- [ext.commands] Fix - Cog.has_error_handlernot working as intended.
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¶
- Add support for stage channels via - StageChannel(#6602, #6608)
- Add support for MessageReference.fail_if_not_exists(#6484)
- By default, if the message you’re replying to doesn’t exist then the API errors out. This attribute tells the Discord API that it’s okay for that message to be missing. 
 
 
- Add support for 
- Add support for Discord’s new permission serialisation scheme. 
- Add an easier way to move channels using - abc.GuildChannel.move()
- Add support for voice regions in voice channels via - VoiceChannel.rtc_region(#6606)
- Add support for - PartialEmoji.url_as()(#6341)
- Add - File.spoiler(#6317)
- Add support for passing - rolesto- Guild.estimate_pruned_members()(#6538)
- Allow callable class factories to be used in - abc.Connectable.play()(#6478)
- Add a way to get mutual guilds from the client’s cache via - User.mutual_guilds(#2539, #6444)
- PartialMessage.edit()now returns a full- Messageupon success (#6309)
- AuditLogEntryis now hashable (#6495)
- Attachmentis now hashable
- Add - Attachment.content_typeattribute (#6618)
- Add support for casting - Attachmentto- strto get the URL.
- Add seedparameter forColour.random(#6562)
- This only seeds it for one call. If seeding for multiple calls is desirable, use - random.seed().
 
 
- Add 
- Add a - utils.remove_markdown()helper function (#6573)
- Add support for passing scopes to - utils.oauth_url()(#6568)
- [ext.commands] Add support for - rgbCSS function as a parameter to- ColourConverter(#6374)
- [ext.commands] Add support for converting - StoreChannelvia- StoreChannelConverter(#6603)
- [ext.commands] Add support for stripping whitespace after the prefix is encountered using the - strip_after_prefix- Botconstructor parameter.
- [ext.commands] Add - Context.invoked_parentsto get the aliases a command’s parent was invoked with (#1874, #6462)
- [ext.commands] Add a converter for - PartialMessageunder- ext.commands.PartialMessageConverter(#6308)
- [ext.commands] Add a converter for - Guildunder- ext.commands.GuildConverter(#6016, #6365)
- [ext.commands] Add Command.has_error_handler
- This is also adds - Cog.has_error_handler
 
 
- [ext.commands] Add 
- [ext.commands] Allow callable types to act as a bucket key for cooldowns (#6563) 
- [ext.commands] Add - linesepkeyword argument to- Paginator(#5975)
- [ext.commands] Allow - Noneto be passed to- HelpCommand.verify_checksto only verify in a guild context (#2008, #6446)
- [ext.commands] Allow relative paths when loading extensions via a - packagekeyword argument (#2465, #6445)
Bug Fixes¶
- Fix mentions not working if - mention_authoris passed in- abc.Messageable.send()without- Client.allowed_mentionsset (#6192, #6458)
- Fix user created instances of CustomActivitytriggering an error (#4049)
- Note that currently, bot users still cannot set a custom activity due to a Discord limitation. 
 
 
- Fix user created instances of 
- Fix - ZeroDivisionErrorbeing raised from- VoiceClient.average_latency(#6430, #6436)
- Fix - User.public_flagsnot updating upon edit (#6315)
- Fix - Message.callsometimes causing attribute errors (#6390)
- Fix issue resending a file during request retries on newer versions of - aiohttp(#6531)
- Raise an error when - user_idsis empty in- Guild.query_members()
- Fix - __str__magic method raising when a- Guildis unavailable.
- Fix potential - AttributeErrorwhen accessing- VoiceChannel.members(#6602)
- Embedconstructor parameters now implicitly convert to- str(#6574)
- Ensure - disnakepackage is only run if executed as a script (#6483)
- [ext.commands] Fix irrelevant commands potentially being unloaded during cog unload due to failure. 
- [ext.commands] Fix attribute errors when setting a cog to - HelpCommand(#5154)
- [ext.commands] Fix - Context.invoked_withbeing improperly reassigned during a- reinvoke()(#6451, #6462)
- [ext.commands] Remove duplicates from - HelpCommand.get_bot_mapping(#6316)
- [ext.commands] Properly handle positional-only parameters in bot command signatures (#6431) 
- [ext.commands] Group signatures now properly show up in - Command.signature(#6529, #6530)
Miscellaneous¶
- User endpoints and all userbot related functionality has been deprecated and will be removed in the next major version of the library. 
- Permissionclass methods were updated to match the UI of the Discord client (#6476)
- _and- -characters are now stripped when making a new cog using the- disnakepackage (#6313)
v1.6.0¶
This version comes with support for replies and stickers.
New Features¶
- 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 - AppInfo.icon_url_as()and- AppInfo.cover_image_url_as()(#5888)
- Add - Colour.random()to get a random colour (#6067)
- Add support for replying via Message.reply()(#6061)
- This also comes with the - AllowedMentions.replied_usersetting.
- abc.Messageable.send()can now accept a- MessageReference.
- MessageReferencecan now be constructed by users.
- Message.to_reference()can now convert a message to a- MessageReference.
 
 
- Add support for replying via 
- Add support for getting the replied to resolved message through - MessageReference.resolved.
- Add support for role tags.
- Guild.premium_subscriber_roleto get the “Nitro Booster” role (if available).
- Guild.self_roleto get the bot’s own role (if available).
- Role.tagsto get the role’s tags.
- Role.is_premium_subscriber()to check if a role is the “Nitro Booster” role.
- Role.is_bot_managed()to check if a role is a bot role (i.e. the automatically created role for bots).
- Role.is_integration()to check if a role is role created by an integration.
 
 
- Add Client.is_ws_ratelimited()to check if the websocket is rate limited.
- ShardInfo.is_ws_ratelimited()is the equivalent for checking a specific shard.
 
 
- Add 
- Add support for chunking an - AsyncIteratorthrough- AsyncIterator.chunk()(#6100, #6082)
- Add - PartialEmoji.created_at(#6128)
- Add support for editing and deleting webhook sent messages (#6058)
- This adds - WebhookMessageas well to power this behaviour.
 
 
- Add PartialMessageto allow working with a message via channel objects and just a message_id (#5905)
- This is useful if you don’t want to incur an extra API call to fetch the message. 
 
 
- Add 
- Add - Emoji.url_as()(#6162)
- Add support for - Member.pendingfor the membership gating feature.
- Allow - colourparameter to take- intin- Guild.create_role()(#6195)
- Add support for - presencesin- Guild.query_members()(#2354)
- [ext.commands] Add support for - descriptionkeyword argument in- commands.Cog(#6028)
- [ext.tasks] Add support for calling the wrapped coroutine as a function via - __call__.
Bug Fixes¶
- Raise - DiscordServerErrorwhen reaching 503s repeatedly (#6044)
- Fix - AttributeErrorwhen- Client.fetch_template()is called (#5986)
- Fix errors when playing audio and moving to another channel (#5953) 
- Fix - AttributeErrorwhen voice channels disconnect too fast (#6039)
- Fix stale - Userreferences when the members intent is off.
- Fix - on_user_update()not dispatching in certain cases when a member is not cached but the user somehow is.
- Fix Message.authorbeing overwritten in certain cases during message update.
- This would previously make it so - Message.authoris a- User.
 
 
- Fix 
- Fix - UnboundLocalErrorfor editing- public_updates_channelin- Guild.edit()(#6093)
- Fix uninitialised - CustomActivity.created_at(#6095)
- [ext.commands] Errors during cog unload no longer stops module cleanup (#6113) 
- [ext.commands] Properly cleanup lingering commands when a conflicting alias is found when adding commands (#6217) 
Miscellaneous¶
- ffmpegspawned processes no longer open a window in Windows (#6038)
- Update dependencies to allow the library to work on Python 3.9+ without requiring build tools. (#5984, #5970) 
- Fix docstring issue leading to a SyntaxError in 3.9 (#6153) 
- Update Windows opus binaries from 1.2.1 to 1.3.1 (#6161) 
- Allow - Guild.create_role()to accept- intas the- colourparameter (#6195)
- [ext.commands] - MessageConverterregex got updated to support- www.prefixes (#6002)
- [ext.commands] - UserConverternow fetches the API if an ID is passed and the user is not cached.
- [ext.commands] - max_concurrencyis now called before cooldowns (#6172)
v1.5.1¶
Bug Fixes¶
- Fix - utils.escape_markdown()not escaping quotes properly (#5897)
- Fix moving channels to the end of the channel list (#5923) 
- Fix seemingly strange behaviour in - __eq__for- PermissionOverwrite(#5929)
- 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_UPDATEevents if- MemberCacheFlags.joinedis set. (#5930)
- [ext.commands] MemberConverternow properly lazily fetches members if not available from cache.
- This is the same as having - disnake.Memberas the type-hint.
 
 
- [ext.commands] 
- 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¶
- Support for gateway intents, passed via - intentsin- Clientusing- Intents.
- Add - VoiceRegion.south_korea(#5233)
- Add - Colour.dark_theme()factory method (#1584)
- Add - AllowedMentions.none()and- AllowedMentions.all()(#5785)
- Add more concrete exceptions for 500 class errors under - DiscordServerError(#5797)
- Implement - VoiceProtocolto better intersect the voice flow.
- Add - Guild.chunk()to fully chunk a guild.
- Add - MemberCacheFlagsto better control member cache. See Member Cache for more info.
- Add support for ActivityType.competing(#5823)
- This seems currently unused API wise. 
 
 
- Add support for 
- Add support for message references, - Message.reference(#5754, #5832)
- Add alias for - ColourConverterunder- ColorConverter(#5773)
- Add alias for - PublicUserFlags.verified_bot_developerunder- PublicUserFlags.early_verified_bot_developer(#5849)
- [ext.commands] Add support for - require_var_positionalfor- Command(#5793)
Bug Fixes¶
- Fix issue with - Guild.by_category()not showing certain channels.
- Fix - abc.GuildChannel.permissions_syncedalways 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 - Memberreference would be stale when cache is disabled in message events (#5819)
- Fix - allowed_mentionsnot being sent when sending a single file (#5835)
- Fix - overwritesbeing 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 - BadArgumentexceptions 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_syncedalways 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 - Memberreference would be stale when cache is disabled in message events (#5819)
- Fix - allowed_mentionsnot being sent when sending a single file (#5835)
- Fix - overwritesbeing 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¶
- Add support for AllowedMentionsto have more control over what gets mentioned.
- This can be set globally through - Client.allowed_mentions
- This can also be set on a per message basis via - abc.Messageable.send()
 
 
- Add support for 
- AutoShardedClienthas been completely redesigned from the ground up to better suit multi-process clusters (#2654)
- Add - ShardInfowhich allows fetching specific information about a shard.
- The - ShardInfoallows for reconnecting and disconnecting of a specific shard as well.
- Add - AutoShardedClient.get_shard()and- AutoShardedClient.shardsto get information about shards.
- Rework the entire connection flow to better facilitate the - IDENTIFYrate limits.
- Add a hook - Client.before_identify_hook()to have better control over what happens before an- IDENTIFYis done.
- Add more shard related events such as - on_shard_connect(),- on_shard_disconnect()and- on_shard_resumed().
 
 
- Add support for guild templates (#2652)
- This adds - Templateto read a template’s information.
- Client.fetch_template()can be used to fetch a template’s information from the API.
- Client.create_guild()can now take an optional template to base the creation from.
- Note that fetching a guild’s template is currently restricted for bot accounts. 
 
 
- Add support for guild integrations (#2051, #1083)
- Integrationis used to read integration information.
- IntegrationAccountis used to read integration account information.
- Guild.integrations()will fetch all integrations in a guild.
- Guild.create_integration()will create an integration.
- Integration.edit()will edit an existing integration.
- Integration.delete()will delete an integration.
- Integration.sync()will sync an integration.
- There is currently no support in the audit log for this. 
 
 
- Add an alias for - VerificationLevel.extremeunder- VerificationLevel.very_high(#2650)
- Added - VoiceClient.latencyand- VoiceClient.average_latency(#2535)
- Add - use_cachedand- spoilerparameters to- Attachment.to_file()(#2577, #4095)
- Add - positionparameter support to- Guild.create_category()(#2623)
- Allow passing - intfor the colour in- Role.edit()(#4057)
- Add - Embed.remove_author()to clear author information from an embed (#4068)
- Add the ability to clear images and thumbnails in embeds using - Embed.Empty(#4053)
- Add - guild_ready_timeoutparameter to- Clientand subclasses to control timeouts when the- GUILD_CREATEstream takes too long (#4112)
- Add support for public user flags via - User.public_flagsand- PublicUserFlags(#3999)
- Allow changing of channel types via - TextChannel.edit()to and from a news channel (#4121)
- Add - Guild.edit_role_positions()to bulk edit role positions in a single API call (#2501, #2143)
- Add - Guild.change_voice_state()to change your voice state in a guild (#5088)
- Add - PartialInviteGuild.is_icon_animated()for checking if the invite guild has animated icon (#4180, #4181)
- Add - PartialInviteGuild.icon_url_as()now supports- static_formatfor consistency (#4180, #4181)
- Add support for - user_idsin- Guild.query_members()
- Add support for pruning members by roles in - Guild.prune_members()(#4043)
- [ext.commands] Implement - before_invoke()and- after_invoke()decorators (#1986, #2502)
- [ext.commands] Add a way to retrieve - retry_afterfrom a cooldown in a command via- Command.get_cooldown_retry_after(#5195)
- [ext.commands] Add a way to dynamically add and remove checks from a - HelpCommand(#5197)
- [ext.tasks] Add - Loop.is_runningmethod to the task objects (#2540)
- [ext.tasks] Allow usage of custom error handlers similar to the command extensions to tasks using - Loop.errordecorator (#2621)
Bug Fixes¶
- Fix issue with - PartialEmoji.urlreads leading to a failure (#4015, #4016)
- Allow - abc.Messageable.history()to take a limit of- 1even if- aroundis passed (#4019)
- Fix - Guild.member_countnot updating in certain cases when a member has left the guild (#4021)
- Fix the type of - Object.idnot being validated. For backwards compatibility- stris still allowed but is converted to- int(#4002)
- Fix - Guild.edit()not allowing editing of notification settings (#4074, #4047)
- Fix crash when the guild widget contains channels that aren’t in the payload (#4114, #4115) 
- Close ffmpeg stdin handling from spawned processes with - FFmpegOpusAudioand- FFmpegPCMAudio(#4036)
- Fix - utils.escape_markdown()not escaping masked links (#4206, #4207)
- Fix reconnect loop due to failed handshake on region change (#4210, #3996) 
- Fix - Guild.by_category()not returning empty categories (#4186)
- Fix certain JPEG images not being identified as JPEG (#5143) 
- Fix a crash when an incomplete guild object is used when fetching reaction information (#5181) 
- Fix a timeout issue when fetching members using - Guild.query_members()
- Fix an issue where - PartialEmoji.idcould be a string (#4153, #4152)
- Fix regression where - Member.activitieswould not clear.
- [ext.commands] A - TypeErroris now raised when- typing.Optionalis used within- commands.Greedy(#2253, #5068)
- [ext.commands] - Bot.walk_commandsno longer yields duplicate commands due to aliases (#2591)
- [ext.commands] Fix regex characters not being escaped in - HelpCommand.clean_prefix(#4058, #4071)
- [ext.commands] Fix - Bot.get_commandfrom raising errors when a name only has whitespace (#5124)
- [ext.commands] Fix issue with - Context.subcommand_passednot functioning as expected (#5198)
- [ext.tasks] Task objects are no longer stored globally so two class instances can now start two separate tasks (#2294) 
- [ext.tasks] Allow cancelling the loop within - before_loop(#4082)
Miscellaneous¶
- The - Member.rolescache introduced in v1.3 was reverted due to issues caused (#4087, #4157)
- Some more API requests got a reasonparameter for audit logs (#5086)
 
- Some more API requests got a 
- For performance reasons - websocketshas been dropped in favour of- aiohttp.ws.
- The blocking logging message now shows the stack trace of where the main thread was blocking 
- The domain name was changed from - discordapp.comto- discord.comto prepare for the required domain migration
- Reduce memory usage when reconnecting due to stale references being held by the message cache (#5133) 
- Optimize - abc.GuildChannel.permissions_for()by not creating as many temporary objects (20-32% savings).
- [ext.commands] Raise - CommandRegistrationErrorinstead of- ClientExceptionwhen a duplicate error is registered (#4217)
- [ext.tasks] No longer handle - HTTPExceptionby default in the task reconnect loop (#5193)
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 - Noneappearing in- Member.activities. (#2619)
v1.3.2¶
Another minor bug fix release.
Bug Fixes¶
- Higher the wait time during the - GUILD_CREATEstream before- on_readyis fired for- AutoShardedClient.
- on_voice_state_update()now uses the inner- memberpayload which should make it more reliable.
- Fix crashes if - Message.guildis- Objectinstead of- Guild.
- Fix - Webhook.send()returning an empty string instead of- Nonewhen- 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¶
- Add - Guild.fetch_members()to fetch members from the HTTP API. (#2204)
- Add - Guild.fetch_roles()to fetch roles from the HTTP API. (#2208)
- Add support for teams via - Teamwhen fetching with- Client.application_info(). (#2239)
- Add support for suppressing embeds via - Message.edit()
- Add support for guild subscriptions. See the - Clientdocumentation for more details.
- Add - VoiceChannel.voice_statesto get voice states without relying on member cache.
- Add - Guild.query_members()to request members from the gateway.
- Add - FFmpegOpusAudioand other voice improvements. (#2258)
- Add - RawMessageUpdateEvent.channel_idfor retrieving channel IDs during raw message updates. (#2301)
- Add - RawReactionActionEvent.event_typeto disambiguate between reaction addition and removal in reaction events.
- Add - abc.GuildChannel.permissions_syncedto query whether permissions are synced with the category. (#2300, #2324)
- Add - MessageType.channel_follow_addmessage type for announcement channels being followed. (#2314)
- Add - Message.is_system()to allow for quickly filtering through system messages.
- Add - VoiceState.self_streamto indicate whether someone is streaming via Go Live. (#2343)
- Add - Emoji.is_usable()to check if the client user can use an emoji. (#2349)
- Add - VoiceRegion.europeand- VoiceRegion.dubai. (#2358, #2490)
- Add - TextChannel.follow()to follow a news channel. (#2367)
- Add - Permissions.view_guild_insightspermission. (#2415)
- Add support for new audit log types. See Audit Logs for more information. (#2427)
- Note that integration support is not finalized. 
 
 
- Add - Webhook.typeto query the type of webhook (- WebhookType). (#2441)
- Allow bulk editing of channel overwrites through - abc.GuildChannel.edit(). (#2198)
- Add - Activity.created_atto see when an activity was started. (#2446)
- Add support for - xsalsa20_poly1305_liteencryption mode for voice. (#2463)
- Add - RawReactionActionEvent.memberto get the member who did the reaction. (#2443)
- Add support for new YouTube streaming via - Streaming.platformand- Streaming.game. (#2445)
- Add - Guild.discovery_splash_urlto get the discovery splash image asset. (#2482)
- Add Guild.rules_channelto get the rules channel of public guilds. (#2482)
- It should be noted that this feature is restricted to those who are either in Server Discovery or planning to be there. 
 
 
- Add 
- Add support for message flags via - Message.flagsand- MessageFlags. (#2433)
- Add - User.systemand- Profile.systemto know whether a user is an official Discord Trust and Safety account.
- Add - Profile.team_userto check whether a user is a member of a team.
- Add - Attachment.to_file()to easily convert attachments to- Filefor sending.
- Add certain aliases to Permissionsto match the UI better. (#2496)
 
- Add certain aliases to 
- Add support for passing keyword arguments when creating - Permissions.
- Add support for custom activities via CustomActivity. (#2400)
- Note that as of now, bots cannot send custom activities yet. 
 
 
- Add support for custom activities via 
- Add support for - on_invite_create()and- on_invite_delete()events.
- Add support for clearing a specific reaction emoji from a message.
- Message.clear_reaction()and- Reaction.clear()methods.
- on_raw_reaction_clear_emoji()and- on_reaction_clear_emoji()events.
 
 
- Add - utils.sleep_until()helper to sleep until a specific datetime. (#2517, #2519)
- [ext.commands] Add support for teams and - Bot.owner_idsto have multiple bot owners. (#2239)
- [ext.commands] Add new - BucketType.rolebucket type. (#2201)
- [ext.commands] Expose - Command.cogproperty publicly. (#2360)
- [ext.commands] Add non-decorator interface for adding checks to commands via - Command.add_checkand- Command.remove_check. (#2411)
- [ext.commands] Add - has_guild_permissionscheck. (#2460)
- [ext.commands] Add - bot_has_guild_permissionscheck. (#2460)
- [ext.commands] Add - predicateattribute to checks decorated with- check().
- [ext.commands] Add - check_any()check to logical OR multiple checks.
- [ext.commands] Add - max_concurrency()to allow only a certain amount of users to use a command concurrently before waiting or erroring.
- [ext.commands] Add support for calling a - Commandas a regular function.
- [ext.tasks] - Loop.add_exception_typenow allows multiple exceptions to be set. (#2333)
- [ext.tasks] Add - Loop.next_iterationproperty. (#2305)
Bug Fixes¶
- Fix issue with permission resolution sometimes failing for guilds with no owner. 
- Tokens are now stripped upon use. (#2135) 
- Passing in a - nameis no longer required for- Emoji.edit(). (#2368)
- Fix issue with webhooks not re-raising after retries have run out. (#2272, #2380) 
- Fix mismatch in URL handling in - utils.escape_markdown(). (#2420)
- Fix issue with ports being read in little endian when they should be big endian in voice connections. (#2470) 
- Fix - Member.mentioned_in()not taking into consideration the message’s guild.
- Fix bug with moving channels when there are gaps in positions due to channel deletion and creation. 
- Fix - on_shard_ready()not triggering when- fetch_offline_membersis disabled. (#2504)
- Fix issue with large sharded bots taking too long to actually dispatch - on_ready().
- Fix issue with fetching group DM based invites in - Client.fetch_invite().
- Fix out of order files being sent in webhooks when there are 10 files. 
- [ext.commands] Extensions that fail internally due to ImportError will no longer raise - ExtensionNotFound. (#2244, #2275, #2291)
- [ext.commands] Updating the - Paginator.suffixwill not cause out of date calculations. (#2251)
- [ext.commands] Allow converters from custom extension packages. (#2369, #2374) 
- [ext.commands] Fix issue with paginator prefix being - Nonecausing empty pages. (#2471)
- [ext.commands] - Greedynow ignores parsing errors rather than propagating them.
- [ext.commands] - Command.can_runnow checks whether a command is disabled.
- [ext.commands] - HelpCommand.clean_prefixnow takes into consideration nickname mentions. (#2489)
- [ext.commands] - Context.send_helpnow properly propagates to the- HelpCommand.on_help_command_errorhandler.
Miscellaneous¶
- The library now fully supports Python 3.8 without warnings. 
- Bump the dependency of - websocketsto 8.0 for those who can use it. (#2453)
- Due to Discord providing - Memberdata in mentions, users will now be upgraded to- Membermore often if mentioned.
- utils.escape_markdown()now properly escapes new quote markdown.
- The message cache can now be disabled by passing - Noneto- max_messagesin- 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_clockin- Client.
 
 
- The performance of - Guild.default_rolehas been improved from O(N) to O(1). (#2375)
- The performance of - Member.roleshas 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 - Userconverter. (#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 - animatedfield in Emoji structures in reactions.
v1.2.4¶
Bug Fixes¶
- Fix a regression when - Message.channelwould be- None.
- Fix a regression where - Message.edited_atwould not update during edits.
- Fix a crash that would trigger during message updates (#2265, #2287). 
- Fix a bug when - VoiceChannel.connect()would not return (#2274, #2372, #2373, #2377).
- Fix a crash relating to token-less webhooks (#2364). 
- Fix issue where - Guild.premium_subscription_countwould be- Nonedue to a Discord bug. (#2331, #2376).
v1.2.3¶
Bug Fixes¶
- Fix an AttributeError when accessing - Member.premium_sincein- on_member_update(). (#2213)
- Handle - asyncio.CancelledErrorin- abc.Messageable.typing()context manager. (#2218)
- Raise the max encoder bitrate to 512kbps to account for nitro boosting. (#2232) 
- Properly propagate exceptions in - Client.run(). (#2237)
- [ext.commands] Ensure cooldowns are properly copied when used in cog level - command_attrs.
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_urland related attributes no longer raise an error.
- More compatibility shims with the - enum.Enumcode.
v1.2.0¶
This update mainly brings performance improvements and various nitro boosting attributes (referred to in the API as “premium guilds”).
New Features¶
- Add - Guild.premium_tierto query the guild’s current nitro boost level.
- Add - Guild.emoji_limit,- Guild.bitrate_limit,- Guild.filesize_limitto query the new limits of a guild when taking into consideration boosting.
- Add - Guild.premium_subscription_countto query how many members are boosting a guild.
- Add - Member.premium_sinceto query since when a member has boosted a guild.
- Add - Guild.premium_subscribersto query all the members currently boosting the guild.
- Add Guild.system_channel_flagsto query the settings for a guild’sGuild.system_channel.
- This includes a new type named - SystemChannelFlags
 
 
- Add 
- Add - Emoji.availableto query if an emoji can be used (within the guild or otherwise).
- Add support for animated icons in - Guild.icon_url_as()and- Guild.icon_url.
- Add - Guild.is_icon_animated().
- Add support for the various new - MessageTypeinvolving nitro boosting.
- Add - VoiceRegion.india. (#2145)
- Add - Embed.insert_field_at(). (#2178)
- Add a - typeattribute for all channels to their appropriate- ChannelType. (#2185)
- Add - Client.fetch_channel()to fetch a channel by ID via HTTP. (#2169)
- Add - Guild.fetch_channels()to fetch all channels via HTTP. (#2169)
- [ext.tasks] Add - Loop.stopto gracefully stop a task rather than cancelling.
- [ext.tasks] Add - Loop.failedto query if a task had failed somehow.
- [ext.tasks] Add - Loop.change_intervalto change the sleep interval at runtime (#2158, #2162)
Bug Fixes¶
- Fix internal error when using - Guild.prune_members().
- [ext.commands] Fix - Command.invoked_subcommandbeing invalid in many cases.
- [ext.tasks] Reset iteration count when the loop terminates and is restarted. 
- [ext.tasks] The decorator interface now works as expected when stacking (#2154) 
Miscellaneous¶
- Improve performance of all Enum related code significantly.
- This was done by replacing the - enum.Enumcode 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 - Memberabout 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 - loggingmodule.
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¶
- There is a new extension dedicated to making background tasks easier.
- You can check the documentation here: API Reference. 
 
 
- Add - Permissions.streampermission. (#2077)
- Add equality comparison and hash support to - Asset
- Add - compute_prune_membersparameter to- Guild.prune_members()(#2085)
- Add - Client.cached_messagesattribute to fetch the message cache (#2086)
- Add - abc.GuildChannel.clone()to clone a guild channel. (#2093)
- Add - delaykeyword-only argument to- Message.delete()(#2094)
- Add support for - <:name:id>when adding reactions (#2095)
- Add - Asset.read()to fetch the bytes content of an asset (#2107)
- Add - Attachment.read()to fetch the bytes content of an attachment (#2118)
- Add support for voice kicking by passing - Noneto- Member.move_to().
disnake.ext.commands¶
- Add new - dm_only()check.
- Support callable converters in - Greedy
- Add new MessageConverter.
- This allows you to use - Messageas a type hint in functions.
 
 
- Add new 
- Add - Command.parentsto fetch the parents of a command (#2104)
Bug Fixes¶
- Fix - AttributeErrorwhen using- __repr__on- Widget.
- Fix issue with - abc.GuildChannel.overwritesreturning- Nonefor keys.
- Remove incorrect legacy NSFW checks in e.g. - TextChannel.is_nsfw().
- Fix - UnboundLocalErrorwhen- RequestsWebhookAdapterraises an error.
- Fix bug where updating your own user did not update your member instances. 
- Tighten constraints of - __eq__in- Spotifyobjects (#2113, #2117)
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 --versiona 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¶
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 preemptively 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.overwritesto get all the permission overwrites of a channel.
- Add - Server.featuresto 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 - Memberinstances 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 - Embedand pass the instance to the- embedkeyword 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:
- Contextis 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- reactionand- userattributes.
- This is for better support in the case that - Noneis returned since tuple unpacking can lead to issues.
 
 
Bug Fixes¶
- Fix bug that disallowed - Noneto be passed for- emojiparameter 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 - aroundargument in 3.5+- Client.logs_from().
- Add support for reactions.
- Client.add_reaction()to add a reactions
- Client.remove_reaction()to remove a reaction.
- Client.get_reaction_users()to get the users that reacted to a message.
- Permissions.add_reactionspermission bit support.
- Two new events, - on_reaction_add()and- on_reaction_remove().
- Message.reactionsto get reactions from a message.
- Client.wait_for_reaction()to wait for a reaction from a user.
 
 
Bug Fixes¶
- Fix bug with Paginator still allowing lines that are too long. 
- Fix the - Permissions.manage_emojisbit being incorrect.
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_emojistoggle.- This applies for - PermissionOverwriteas well.
 
- Add new statuses for - Status.- Status.dnd(aliased with- Status.do_not_disturb) for Do Not Disturb.
- Status.invisiblefor setting your status to invisible (please see the docs for a caveat).
 
- 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¶
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_centraland- ServerRegion.eu_west.
 
- Add support for new pinned system message under - MessageType.pins_add.
- Add order comparisons for - Roleto allow it to be compared with regards to hierarchy.- This means that you can now do - role_a > role_betc to check if- role_bis lower in the hierarchy.
 
- Add - Server.role_hierarchyto get the server’s role hierarchy.
- Add - Member.server_permissionsto 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 - Playerproperty,- Player.errorto fetch the error that stopped the player.- To help with this change, a player’s - afterfunction 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_levelkeyword argument.
- Adds a new attribute in the server, - Server.verification_level.
 
- Add - Server.voice_clientshortcut 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 - websocketslibrary.
- Fix bug that leaked keep alive threads (#309) 
- Fix bug that disallowed - ServerRegionfrom 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_rolethat 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¶
- Permissions.change_nicknameshas been renamed to- Permissions.change_nicknameto match the UI.
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.ownerattribute.
- Add - CallMessagefor group voice call messages.
- Add - GroupCallfor group voice call information.
- Add - Message.system_contentto get the system message.
- Add the remaining VIP servers and the Brazil servers into - ServerRegionenum.
- Add - stderrargument to- VoiceClient.create_ffmpeg_player()to redirect stderr.
- The library now handles implicit permission resolution in - Channel.permissions_for().
- Add - Server.mfa_levelto query a server’s 2FA requirement.
- Add - Permissions.external_emojispermission.
- Add - Member.voiceattribute 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 - cooldowndecorator.
- UserInputErrorexception for the hierarchy for user input related errors.
Bug Fixes¶
- Client.emailis 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 - HEARTBEATopcode is received. This caused bots to disconnect seemingly randomly.
For the command extension, the following bug fixes apply:
- Bot.checkdecorator is actually a decorator not requiring parentheses.
- Bot.remove_commandand- Group.remove_commandno 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. 
- HelpFormatternow 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 - asynciocompatible, 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, - Forbiddenand- NotFoundto denote permission errors or 404 errors.
- Added - Client.delete_invite()to revoke invites.
- Added support for sending voice. Check - VoiceClientfor more details.
- Added - Client.wait_for_message()coroutine to aid with follow up commands.
- Added - version_infonamed 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=Falsewhen 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.meattribute to get the- Memberversion of- Client.user.
- Most data classes now support a - hash(obj)function to allow you to use them in- setor- dictclasses 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.Gameto represent any game with custom text to send to- Client.change_status().
- Add - Message.nonceattribute.
- 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.roleswere empty upon joining instead of having the- @everyonerole.
- 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 - Messagewould attempt to upgrade a- Message.serverwhen the channel is a- Object.
- Unavailable servers were not being added into cache, this has been corrected.