Changelog¶
This page keeps a detailed human friendly rendering of what’s new and changed in specific versions. Please see Version Guarantees for more information.
v2.12.0a [UNRELEASED]¶
Breaking Changes¶
- Emoji.guild_idcan now be- Noneif the emoji is owned by an application. You can use- Emoji.is_guild_emojiand- Emoji.is_app_emojito check if this is a Guild or App Emoji. (#1223)
- SKU.subscriptions()mistakenly returned a coroutine, unlike other iterator methods. Instead of- async for x in await sku.subscriptions():, correct usage now is- async for x in sku.subscriptions():. (#1274)
New Features¶
- Add support to Emojito represent application-owned emojis. (#1223, #1388)
- New methods on - Client:- Client.fetch_application_emoji(),- Client.fetch_application_emojis()and- Client.create_application_emoji().
- New attributes on - Emoji:- Emoji.application_id,- Emoji.is_guild_emojiand- Emoji.is_app_emoji.
 
 
- Add support to 
Bug Fixes¶
- Change - SKU.subscriptions()to be a synchronous method (returning an async iterator), to match other iterator methods. (#1274)
- Add a - __repr__method to- InstallTypeConfiguration. (#1398)
Miscellaneous¶
- Migrate away from pdm and replace with - uvand- nox. See CONTRIBUTING.md for additional information. (#1362)
- Remove upper bound on audioop-lts version and allow v0.2.x. (#1378) 
v2.11.0¶
This version adds the new v2 components to create fully component-driven messages, select menus in modals, support for setting a guild-specific avatar/banner/bio, user nameplates and tags, new message pin endpoints (now with up to 250 pins!), and includes many other improvements and several bugfixes.
Deprecations¶
- InteractionResponse.require_premium()is deprecated in favour of premium buttons (see- ui.Button.sku_id). (#1276)
- Deprecate - with_expirationquery parameter of- Client.fetch_invite()as it is no longer supported from the discord API. (#1296)
- Deprecate awaiting - Messageable.pins()in favour of- async for msg in channel.pins(). (#1305)
- Using ActionRows (or plainTextInputs, which implicitly get wrapped in action rows) in modals is now deprecated in favor ofui.Label. (#1321)
- This deprecates - ui.ActionRow.add_text_input(),- ui.ActionRow.with_modal_components().
- Using - TextInput.labelis also deprecated in favor of- Label("<text>", TextInput(...)).
 
 
- Using 
New Features¶
- Add support for guild incident actions. (#1230)
- Add - IncidentsDataand- Guild.incidents_dataattribute.
- New - invites_disabled_untiland- dms_disabled_untilparameters for- Guild.edit().
 
 
- [ext.commands] Allow passing autocompleters that take a - Cogas first argument to- Param. (#1269)
- Support premium buttons using - ui.Button.sku_id. (#1276)
- Add support for components v2 (example): (#1294)
- These components allow you to have more control over the layout of your messages, and are used instead of the classic - contentand- embedsfields.
- New top-level components:
- ui.Section: Displays an accessory (- ui.Thumbnailor- ui.Button) alongside some text.
- ui.TextDisplay: Text component, similar to the- contentfield of messages.
- ui.MediaGallery: A gallery/mosaic of up to 10- MediaGalleryItems.
- ui.File: Display an uploaded file as an attachment.
- ui.Separator: A spacer/separator adding vertical padding.
- ui.Container: Contains other components, visually similar to- Embeds.
- Each component has a corresponding new - ComponentType.
 
 
- New - MessageFlags.is_components_v2flag. This is set automatically when sending v2 components, and cannot be reverted once set.
- New - ui.walk_components()and- ui.components_from_message()utility functions.
- All - ui.*components now inherit from a common- ui.UIComponentbase class.
- Components now have an - idattribute, which is a unique (per-message) optional numeric identifier.
 
 
- Add - Nameplateand- Collectiblesclasses, as well as- User.collectiblesand- ClientUser.collectiblesattributes. (#1302)
- Update the - Messageable.pins(),- Message.pin()and- Message.unpin()methods to use the new API endpoints.- Messageable.pins()returns now an asynchronous iterator to yield all pinned messages. (#1305)
- Add the new - Activity.details_url,- Activity.state_url,- Activity.status_display_typeand- StatusDisplayTypeRPC attributes and enum. (#1307)
- Add - flagsparameter to- Webhook.edit_message(),- WebhookMessage.edit(), and- InteractionResponse.edit_message(). (#1310)
- Add - Role.primary_colour(),- Role.secondary_colour(),- Role.tertiary_colour(),- Colour.holographic_style(), and aliases, as well as- primary_colour,- secondary_colour,- tertiary_colourarguments, and aliases, to- Role.edit()and- Guild.create_role(). (#1311)
- Add the - pin_messagespermission. (#1313)
- Add - MemberFlags.automod_quarantined_guild_tag()member flag. (#1315)
- Add - AuditLogAction.automod_quarantine_useraction type. (#1317)
- Add support for new components in Modals. (#1321, #1361)
- The new top-level - ui.Labelcomponent wraps other components (currently- TextInputand select menus) in a modal with a label and description.
- ui.TextDisplaycan now be used as a top-level component in modals.
- ui.StringSelectand auto-populated select menus such as- ui.UserSelectare now usable in modals when placed inside a- ui.Label.
- The new modal-specific - requiredfield can be used to make a select menu optional.
- The values provided by users on modal submit are available in - ModalInteraction.resolved_values(raw values in- ModalInteraction.resolved_values).
 
 
- Add support for new components in 
- Add - PrimaryGuildand- User.primary_guild(). (#1333)
- Add preliminary support for Python 3.14. (#1337) 
- Support setting a guild-specific nickname, avatar, and banner using - Member.edit(). (#1364)
- Implement missing fields on - AppInfo:- event_webhooks_url,- event_webhooks_status,- event_webhooks_types,- redirect_uris. (#1369)
- Added support for emoji added system messages. (#1370)
- New message type - MessageType.emoji_added
- New system channel flag attr - SystemChannelFlags.emoji_added_notifications
 
 
Bug Fixes¶
- Prevent - DeprecationWarningrelated to- Message.interactionfield on shard reconnect. (#1267)
- Fix missing/faulty - Subscription-related gateway events. (#1275)
- [ext.commands] Fix extracting localization key for - sub_command_group()s from docstring, to be more consistent with top-level slash commands and sub commands. (#1285)
- Improve checks for partial - Guilds in guild-dependent attributes of channels and threads, which could previously raise errors with user-installed apps, as they don’t always receive complete guild data. (#1287)
- [ext.tasks] Correctly handle - Loop.change_intervalwhen called from- before_loop()or through other means before initial loop run. (#1290)
- Avoid stripping port from voice websocket endpoints. (#1301) 
- Properly support aiohttp 3.11 without deprecation warnings. (#1324) 
- Depend on typing_extensions explicitly, rather than through aiohttp. (#1328) 
- Fix - Guild.fetch_members()and- TextChannel.archived_threads()iterators returning more elements than specified by- limitunder certain circumstances. (#1331)
- Fix missing - avatar_decorationon the old- Memberin- on_member_update()events. (#1350)
Documentation¶
- Update required permissions for - Guild.invites()and in the invite attribute table. (#1348)
Miscellaneous¶
- [ext.commands] Add typing annotations to - HelpCommandand related types. (#828)
- Add the first 25 characters of - Message.contentto the repr of- Message. (#884)
- Decrease the default - Guild.filesize_limitfrom 25MB to 10MB. (#1272)
- Update internal package management tooling to latest versions, speed up CI by caching dependency metadata. (#1278) 
- Remove bad example code snippet that can cause bugs using yt_dlp lib. (#1304) 
- Bump ruff to 0.12.11. (#1326) 
- Bump pytest and the rest of the test suite to the latest supported versions on Python 3.8. (#1327) 
- Add more typing to most modules, increasing type completeness. (#1329) 
- Migrate determining which packages to include in the built wheel and package from a static setup.py list to dynamic configured in pyproject.toml. (#1356) 
- Rework the - nox -s coveragesession to allow providing arguments directly to coverage.py. (#1359)
v2.10.2¶
This is a maintenance release with several bugfixes.
Bug Fixes¶
- Fix missing/faulty - Subscription-related gateway events. (#1275)
- [ext.commands] Fix extracting localization key for - sub_command_group()s from docstring, to be more consistent with top-level slash commands and sub commands. (#1285)
- Improve checks for partial - Guilds in guild-dependent attributes of channels and threads, which could previously raise errors with user-installed apps, as they don’t always receive complete guild data. (#1287)
- [ext.tasks] Correctly handle - Loop.change_intervalwhen called from- before_loop()or through other means before initial loop run. (#1290)
- Avoid stripping port from voice websocket endpoints. (#1301) 
- Properly support aiohttp 3.11 without deprecation warnings. (#1324) 
Miscellaneous¶
- Decrease the default - Guild.filesize_limitfrom 25MB to 10MB. (#1272)
- Remove bad example code snippet that can cause bugs using yt_dlp lib. (#1304) 
v2.10.1¶
Bug Fixes¶
- Prevent - DeprecationWarningrelated to- Message.interactionfield on shard reconnect. (#1267)
v2.10.0¶
This release comes with support for user apps (see Installation/Interaction Contexts), polls, message forwarding,
avatar decorations, media channels, soundboards, subscriptions/monetization,
proper support for Python 3.12 and 3.13 functionality (such as 3.12’s new type statement),
and lots of smaller features, improvements, and other bugfixes.
See below for a complete list of changes.
Deprecations¶
- Client.fetch_premium_sticker_packs()was renamed to- Client.fetch_sticker_packs(); the old name is deprecated. (#1082)
- Deprecate - Message.interactionattribute and- InteractionReference. Use- Message.interaction_metadatainstead. (#1173)
- Deprecate - ApplicationCommand.dm_permissionand related fields/parameters of application command objects. Use- contextsinstead. (#1173)
New Features¶
- Support activity assets with - mp:prefix in- Activity.large_image_urland- Activity.small_image_url, now returning the correct url. (#687)
- Move asset properties from - Activityto all activity types:- large_image_url,- small_image_url,- large_image_text,- small_image_text. (#687)
- [ext.commands] Skip evaluating annotations of - self(if present) and- ctxparameters in prefix commands. These may now use stringified annotations with types that aren’t available at runtime. (#847)
- Add - guild_scheduled_eventparameter to- StageChannel.create_instance(). (#882)
- Add support for avatar decorations using: (#889)
 
- Added - with_countsparameter to- Client.fetch_guild()and- Client.fetch_guilds(), used to determine whether to include the guild’s member count and presence information. (#892)
- Move the event listener system implementation from - ext.commands.Botto- Client, making Clients able to have more than one listener per event type. (#975)
- Support voice channel effect events. (#993)
- New events: - on_voice_channel_effect(),- on_raw_voice_channel_effect().
- New types: - VoiceChannelEffect,- RawVoiceChannelEffectEvent.
- New enum: - VoiceChannelEffectAnimationType.
 
 
- Interactions now always have a proper- channelattribute, even when the bot is not part of the guild or cannot access the channel due to other reasons. (#1012)
- Add - delete_afterparameter to- Interaction.edit_original_response(),- InteractionResponse.edit_message()and- InteractionMessage.edit(). (#1014)
- Make - Interactionand subtypes accept the bot type as a generic parameter to denote the type returned by the- botand- clientproperties. (#1036, #1121)
- [ext.commands] Implement - app_check()and- app_check_any()decorators. (#1045)
- [ext.commands] Log errors raised by - ext.commands.Cog.cog_unload(). (#1046)
- Add support for media channels. (#1050)
- Add MediaChannel.
- Unless otherwise noted, media channels behave just like forum channels. 
 
 
- Add 
- Add - ChannelType.media.
- Add - CategoryChannel.create_media_channel,- Guild.create_media_channel.
 
 
- Rename - Intents.emojis_and_stickersto- Intents.expressions. An alias is provided for backwards compatibility. (#1068)
- Implement soundboard features. (#1068)
- Sound models: - PartialSoundboardSound,- SoundboardSound,- GuildSoundboardSound
- Managing sounds:
- Get soundboard sounds using - Guild.soundboard_sounds,- Client.get_soundboard_sound, or fetch them using- Guild.fetch_soundboard_sound(),- Guild.fetch_soundboard_sounds(), or- Client.fetch_default_soundboard_sounds()
- New sounds can be created with - Guild.create_soundboard_sound()
- Handle guild soundboard sound updates using the - guild_soundboard_sounds_updateevent
 
 
- Send sounds using - VoiceChannel.send_soundboard_sound()
- New attributes: - Guild.soundboard_limit,- VoiceChannelEffect.sound,- Client.soundboard_sounds
- New audit log actions: - AuditLogAction.soundboard_sound_create,- soundboard_sound_update,- soundboard_sound_delete
 
 
- Add - RoleFlagstype and- Role.flags. (#1069)
- Add - AttachmentFlagstype and- Attachment.flags. (#1073)
- Add support for threads in - Webhook.fetch_message(),- edit_message(), and- delete_message(), as well as their sync counterparts. (#1077)
- Add - default_layoutparameter to- Guild.create_forum_channel()and- ForumChannel.clone(). (#1078)
- Add - AuditLogActionvalues related to creator monetization. (#1080)
- Add - applied_tagsparameter to- Webhook.send(). (#1085)
- Make - CustomActivity.statefall back to the provided- name, simplifying setting a custom status. (#1087)
- Add - Permissions.create_guild_expressionsand- Permissions.create_events. (#1091)
- Add - TeamMember.role. (#1094)
- [ext.commands] Update - Bot.is_ownerto take team member roles into account. (#1094)
- Add - created_atproperty to- AutoModRule,- ForumTag,- Integration,- StageInstance, and- Team. (#1095)
- Support - integration_typefield in- AuditLogEntry.extra(for- kickand- member_role_updateactions). (#1096)
- Add new - Colours:- light_embed()and- dark_embed(). (#1102)
- Support application subscriptions and one-time purchases (see the official docs for more info). (#1113, #1186, #1249, #1257)
- New types: - SKU,- Entitlement,- Subscription.
- New - Interaction.entitlementsattribute, and- InteractionResponse.require_premium()response type.
- New events: - on_entitlement_create(),- on_entitlement_update(),- on_entitlement_delete(),- on_subscription_create(),- on_subscription_update()and- on_subscription_delete().
- New - Clientmethods:- skus(),- entitlements(),- fetch_entitlement(),- create_entitlement().
 
 
- Add - SelectDefaultValue, and add- default_valuesto all auto-populated select menu types. (#1115)
- [ext.commands] Support Python 3.12’s - typestatement and- typing.TypeAliasTypeannotations in command signatures. (#1128)
- Add - Invite.type. (#1142)
- Add - Locale.es_LATAMlocale. (#1148)
- Make typing more precise for - Client.create_global_command(),- Client.edit_global_command(),- Client.create_guild_command()and- Client.edit_guild_command(). (#1151)
- Add raw equivalent of - on_presence_update()-- on_raw_presence_update(). (#1152)
- InteractionReference.usercan now be a- Memberin guild contexts. (#1160)
- Add - bannerparameter to- ClientUser.edit(). (#1165)
- Add support for user-installed commands. See Installation/Interaction Contexts for further details. (#1173, #1261)
- Add - ApplicationCommand.install_typesand- ApplicationCommand.contextsfields, with respective- ApplicationInstallTypesand- InteractionContextTypesflag types.
- Interactionchanges:
- Add - Interaction.contextfield, reflecting the context in which the interaction occurred.
- Add - Interaction.authorizing_integration_ownersfield and- AuthorizingIntegrationOwnersclass, containing details about the application installation.
- Interaction.app_permissionsis now always provided by Discord.
 
 
- Add - Message.interaction_metadataand- InteractionMetadatatype, containing metadata for the interaction associated with a message.
- Add - integration_typeparameter to- utils.oauth_url().
- Add - AppInfo.guild_install_type_configand- AppInfo.user_install_type_configfields.
- [ext.commands] Add - install_typesand- contextsparameters to application command decorators.
- [ext.commands] Add - install_types()and- contexts()decorators.
- [ext.commands] Using the - GuildCommandInteractionannotation now sets- install_typesand- contexts, instead of- dm_permission.
- [ext.commands] Add - default_install_typesand- default_contextsparameters to- Bot.
 
 
- Support banning multiple users at once using - Guild.bulk_ban(). (#1174)
- Add the new poll discord API feature. This includes the following new classes and events: (#1175)
- New types: - Poll,- PollAnswer,- PollMedia,- RawPollVoteActionEventand- PollLayoutType.
- Edited - abc.Messageable.send(),- Webhook.send(),- ext.commands.Context.send()and- disnake.InteractionResponse.send_message()to be able to send polls.
- Edited - Messageto store a new- Message.pollattribute for polls.
- Edited - Eventto contain the new- on_poll_vote_add(),- on_poll_vote_remove(),- on_raw_poll_vote_add()and- on_raw_poll_vote_remove().
 
 
- Add the possibility to pass - disnake.Fileobjects to- Embed.set_author()and- set_footer(). (#1184)
- Add support for message forwarding. New - ForwardedMessage, new enum- MessageReferenceType, new method- Message.forward(), edited- MessageReferenceto support message forwarding. (#1187)
- The - clsparameter of UI component decorators (such as- ui.button()) now accepts any matching callable, in addition to item subclasses. (#1190)
- Implement new - Member.guild_bannerproperty. (#1203)
- Add - Permissions.use_external_apps, and a new- Permissions.appscategory to match the Discord client UI. (#1211)
- Add new - poll_resultmessage type. (#1212)
- Add - Guild.fetch_voice_state()to fetch the- VoiceStateof a member. (#1216)
- Add new - Attachment.titleattribute. (#1218)
- Add - AppInfo.approximate_guild_countand- AppInfo.approximate_user_install_count. (#1220)
- Add new - Client.fetch_sticker_pack()method. (#1221)
- For interactions in private channels, Interaction.channelis now always a properDMChannelorGroupChannelobject, instead ofPartialMessageable. (#1233)
- This also applies to other channel objects in interactions, e.g. channel parameters in slash commands, or - ui.ChannelSelect.values.
 
 
- For interactions in private channels, 
- Add support for - BaseFlagsto allow comparison with- flag_valuesand vice versa. (#1238)
- Implement - is_guest,- started_home_actions,- completed_home_actions,- automod_quarantined_username,- dm_settings_upsell_acknowledgednew member flags. (#1245)
- Implement the new - Guild.fetch_role()API method. (#1247)
Bug Fixes¶
- Fix - ui.Modaltimeout issues with long-running callbacks, and multiple modals with the same user and- custom_id. (#914)
- [ext.commands] Fix incorrect typings of - InvokableApplicationCommand.add_check,- InvokableApplicationCommand.remove_check,- Bot.add_app_command_checkand- Bot.remove_app_command_check. (#1045)
- Update - Colour.dark_theme()to match Discord theme change. (#1102)
- Update - choicestype in app commands to accept any- Sequenceor- Mapping, instead of the more constrained- list/- dicttypes. (#1136)
- Support fetching invites with - nullchannel (e.g. friend invites). (#1142)
- Adjust type annotations to allow - Objectas- categoryparameter in- Guild.create_text_channel()and similar methods. (#1162)
- [ext.commands] Fix usage of - role-type cooldowns in threads, which incorrectly operated on a per-channel basis instead. (#1200)
- [ext.commands] Fix incorrect exception when using the - default_member_permissions()decorator on a- user_command()while also using the cog-level- user_command_attrsfield. (#1252)
- Escape forward slashes in HTTP route parameters. (#1264) 
Documentation¶
- Add inherited attributes to - TeamMember, and fix- TeamMember.avatardocumentation. (#1094)
- Document the - Optionattributes, the- descriptionand- optionsproperties for- ext.commands.InvokableSlashCommandand the- descriptionand- bodyproperties for- ext.commands.SubCommand. (#1112)
- Make all “Supported Operations” container elements collapsible. (#1126) 
Miscellaneous¶
- Update the - python -m disnake newcogtemplate to include all missing special methods. (#808)
- Overhaul and simplify contribution guide. (#1098) 
- [ext.commands] Rewrite slash command signature evaluation to use the same mechanism as prefix command signatures. This should not have an impact on user code, but streamlines future changes. (#1116) 
- Start testing with Python 3.12 in CI. (#1117) 
- Reduce the amount of unknown (unresolved) types in public-facing APIs. (#1167) 
- Remove - disnake[discord]extra; the shim is deprecated, and has not been updated for several versions. (#1196)
- Move enum member documentation into docstrings. (#1243) 
- Support Python 3.13. (#1263) 
v2.9.3¶
This is a maintenance release with several minor bugfixes.
Notably, this includes support for a newer voice encryption mode;
all modes supported in previous versions are scheduled to be discontinued on 18th November 2024,
and voice connections using the builtin VoiceClient will fail to connect.
New Features¶
- Add support for - aead_xchacha20_poly1305_rtpsizeencryption mode for voice connections, and remove deprecated- xsalsa20_poly1305*modes. (#1228)
Bug Fixes¶
- Attempt to handle abrupt websocket closures on - aiohttp >= 3.9.0and- python < 3.11.0gracefully. (#1241)
Documentation¶
- Adding some clarifying documentation around the type of - AuditLogEntry.extrawhen the action is- overwrite_create. (#1180)
Miscellaneous¶
- Raise PyNaCl version requirement to - v1.5.0. (#1228)
v2.9.2¶
Bug Fixes¶
- [ext.commands] Fix erroneous - LocalizationWarnings when using localized slash command parameters in cogs. (#1133)
- Handle unexpected - RECONNECTopcode where- HELLOis expected during initial shard connection. (#1155)
- Reconnect gateway websocket on protocol errors. (#1159) 
- Avoid - AttributeErrorin- FFmpegAudiowhen cleaning up after failing to spawn ffmpeg process. (#1164)
- Fix base URL for stickers with - StickerFormatType.gif. (#1189)
Documentation¶
- Adding some clarifying documentation around the executable parameters of audio classes based off of internal discussions. (#1158) 
Miscellaneous¶
- Add - StandardStickerto- stickersparameter type annotation of- Messageable.send()and- ForumChannel.create_thread(). (#1134)
v2.9.1¶
Bug Fixes¶
- Allow - clsargument in select menu decorators (e.g.- ui.string_select()) to be specified by keyword instead of being positional-only. (#1111)
- [ext.commands] Fix edge case in evaluation of multiple identical annotations with forwardrefs in a single signature. (#1120) 
- Fix - Thread.permissions_for()not working in some cases due to an incorrect import. (#1123)
Documentation¶
- Miscellaneous grammar/typo fixes for Audit Logs. (#1105) 
v2.9.0¶
This release comes with support for the new username system, text in stage, role subscriptions, silent messages, and onboarding. The documentation has been updated, splitting the monolithic API Reference page into smaller pages.
See below for a complete list of changes.
Deprecations¶
- AutoModTriggerType.harmful_linkis obsolete, it is now enabled Discord-wide. (#986)
- The - PartyTypeenum is deprecated, as voice activity IDs are not officially documented and the enum regularly becomes outdated. (#1035)
- [ext.commands] - Rangeand- Stringnow require a type argument (i.e.- Range[int, 1, 5]instead of- Range[1, 5], similarly with- String[str, 2, 4]). The old form is deprecated. (#991)
- [ext.commands] The mypy plugin is now a no-op. It was previously used for supporting - Range[]and- String[]annotations. (#991)
New Features¶
- Clone most attributes in - TextChannel.clone(),- VoiceChannel.clone(),- StageChannel.clone(),- CategoryChannel.clone(), and- ForumChannel.clone(), and add them as keyword-only parameters to make in-place edits. See the specific- clonemethod’s documentation for details. (#635)
- Implement new - AutoModTriggerMetadata.mention_raid_protection_enabledparameter. (#898)
- Add support for raid alerts. (#899)
- Add - raid_alerts_disabledand- safety_alerts_channelparameters to- Guild.edit().
 
 
- Add features related to role subscriptions. (#904, #913)
- New message type: - role_subscription_purchase.
- New role tags: - RoleTags.subscription_listing_id,- RoleTags.is_available_for_purchase, and- RoleTags.is_subscription.
- New type - RoleSubscriptionDataand attribute- Message.role_subscription_data.
- New system channel flags: - role_subscription_purchase_notificationsand- role_subscription_purchase_notification_replies.
 
 
- Add - oldest_firstparameter to- Guild.audit_logs(). (#919)
- Implement Onboarding. (#928)
- Add - Onboarding,- OnboardingPromptand- OnboardingPromptOption.
- Add - Guild.onboarding().
 
 
- Add - flagsparameter to message send and edit methods. (#929)
- Messages can now be sent within StageChannelinstances. (#942)
- StageChannelnow inherits from- abc.Messageable
- New StageChannelproperties:
 
- New 
- New StageChannelmethods:
- .is_nsfw,- .get_partial_message,- .delete_messages,- .purge,- .webhooks,- .create_webhook
 
- New 
- Add - nsfwand- slowmode_delayparameters to- Guild.create_stage_channel()and- CategoryChannel.create_stage_channel()
- Add - nsfwand- slowmode_delayparameters to- StageChannel.edit()
- Add text related permission support to - StageChannel.permissions_for().
 
 
- Messages can now be sent within 
- New message types that are sent within StageChannelinstances: (#942)
 
- New message types that are sent within 
- Add edit support for - user_limitto- StageChannel.edit(). (#942)
- Add support for setting - user_limitand- video_quality_modewhen creating a- StageChannelwith- Guild.create_stage_channel(). (#942)
- Cleanup general error raising to be less confusing. (#950)
- Overall, most errors about incorrect types no longer include the internal error in their traceback. 
 
 
- Add support for - AutoModBlockMessageAction.custom_message(#954)
- Support comparison of - VoiceRegionobjects. (#962)
- Add a new voice channel activity, - PartyType.gartic_phone. (#984)
- Add - ApplicationFlags.application_auto_moderation_rule_create_badge(#988)
- Add support for new username system - see the official help article for details. Existing functionality is kept backwards-compatible while the migration is still ongoing. (#1025, #1044)
- Add User.global_name, and update attributes/methods to account for it:
 
- Add 
- Update - str(user)and- str(member)to not include- #0discriminator of migrated users.
- Adjust - User.default_avatarto account for new default avatar handling, also adding- DefaultAvatar.fuchsia.
 
 
- Support - animatedemoji field in reaction removal events (e.g.- on_raw_reaction_remove()). (#1040)
- Implement receiving voice messages. (#1041)
- New flag: - MessageFlags.is_voice_message
- New - Attachmentfields:- duration,- waveform
 
 
- [ext.commands] Add - Bot.get_listeners(). (#976)
- [ext.commands] - UserConverterand- MemberConverter, now mostly match the behavior of- Guild.get_member_named()
Bug Fixes¶
- Fix a bug with - ForumChannel.clone()not properly copying the- default_auto_archive_durationattribute into the newly-cloned channel. (#635)
- Fix - VoiceClientnot continuing to play audio when moving between channels. (#845)
- Prevent stray voice websocket heartbeat threads after reconnecting. (#863) 
- Fix KeepAlive logging un-intentionally attempting to interpolate stack trace logger calls (#940) 
- Fix - VoiceChannel.permissions_for()not disabling- Permissions.manage_webhookswhen the user cannot connect to the channel. (#942)
- RawTypingEvent.timestampis now a timezone-aware- datetimeinstead of a naive one. (#945)
- Fix attribute error when attempting to access - DMChannel.flagsunder certain circumstances. (#960)
- Fix voice connection discovery using incorrect packet sizes. (#967) 
- Fix - Guild.get_or_fetch_members()not caching anything in the case of 1 unresolved ID. (#974)
- Fix audit log parsing issue with new user profile automod actions. (#995) 
- Improve - GuildStickerdeserialization, fix- GuildSticker.edit()parameter types to match documentation. (#996)
- Fix - ForumChannel.create_thread()usage with files only (and no other content), and fix file descriptions not being sent on thread creation. (#1008)
- Fix some instances where threads were not being returned in - AuditLogEntry.extra. (#1009)
- Guild.fetch_members()no longer requires the- membersintent to be enabled when connecting to the gateway, now it solely depends on the intent being enabled in the developer portal. (#1013)
- Fix error when trying to access - Client.application_flagsif an- application_idwas passed to the constructor. (#1027)
- Raise - TypeErrorin- Guild.create_automod_rule()and- AutoModRule.edit()when an action has an invalid type, instead of a rather cryptic error. (#1030)
- Fix permission resolution for - Threads to use- Permissions.send_messages_in_threadsinstead of- Permissions.send_messagesfor calculating implicit permissions. (#1047)
- Fix typing issue with - abc.Userprotocol requirements, which previously resulted in- Userand- Membernot conforming to the protocol. (#1051)
- [ext.commands] Allow referencing the same ParamInfo instance in multiple signatures. (#946) 
- [ext.commands] Fix type-checker support for - Rangeand- Stringby requiring type argument (i.e.- Range[int, 1, 5]instead of- Range[1, 5]). (#991)
- [ext.commands] Raise - TypeErrorif- InteractionBotor- AutoShardedInteractionBothas prefix commands related things in a- Cog(#1018)
- [ext.commands] Fix member nickname not being used by - clean_contentconverter when user wasn’t found in mentions. (#1029)
Documentation¶
- Split the monolithic API Reference pages into multiple sub-references. (#392)
- Main - disnakeAPI reference can now be found at API Reference.
- disnake.ext.commandsAPI reference is now under Commands API Reference.
- Legacy - api.htmland- ext/commands/api.htmlpages are deprecated.
- Links with pre-existing references (eg - /api.html#disnake.AppInfo) will be redirected to their appropriate page.
 
 
 
- Update automod rule limits. (#931) 
- Remove incorrect documentation for - InvokableApplicationCommand.invoke(). (#961)
- Add a searchbox for filtering the sidebar on the API Reference pages. (#963) 
- Clarify docs about the - on_member_update()and- on_raw_member_update()events. (#992)
- Remove - pins()method from unsupported channel types. (#1033)
- Update “Creating a Bot Account” page with newer images and synchronise info according to latest changes made by Discord. (#1039) 
- Add note to - GuildChannel.create_inviteand all subclasses about the new 30 day expiration limit imposed for non-community guilds. (#1056)
- [ext.commands] Fix commands extension events being duplicated in search results. (#944) 
Miscellaneous¶
- Change dependency and environment management to use pdm. (#836, #953)
- Please check CONTRIBUTING.md for more details. 
 
- Change the main linter to - ruffinstead of- flake8. (#935)
- Support PyNaCl v1.5. (#968) 
- Remove - disnake.utils.parse_token()(never documented), which has been broken for newer tokens for some time, and was based on unofficial information about the token structure. (#990)
- Update typings of - Message.activityand internal- Teampayloads to match API documentation. (#996)
- Increase the default - Guild.filesize_limitfrom 8MB to 25MB, matching the recent increase by Discord. (#1005)
v2.8.2¶
This maintenance release contains backports from v2.9.0.
Bug Fixes¶
- Fix audit log parsing issue with new user profile automod actions. (#995) 
- Improve - GuildStickerdeserialization, fix- GuildSticker.edit()parameter types to match documentation. (#996)
- Fix - ForumChannel.create_thread()usage with files only (and no other content), and fix file descriptions not being sent on thread creation. (#1008)
Miscellaneous¶
- Update typings of - Message.activityand internal- Teampayloads to match API documentation. (#996)
- Increase the default - Guild.filesize_limitfrom 8MB to 25MB, matching the recent increase by Discord. (#1005)
v2.8.1¶
Bug Fixes¶
- Fix - VoiceClientnot continuing to play audio when moving between channels. (#845)
- Fix KeepAlive logging un-intentionally attempting to interpolate stack trace logger calls (#940) 
- Fix attribute error when attempting to access - DMChannel.flagsunder certain circumstances. (#960)
- Fix voice connection discovery using incorrect packet sizes. (#967) 
Documentation¶
- Update automod rule limits. (#931) 
v2.8.0¶
This release comes with support for NSFW application commands,
the on_audit_log_entry_create() event,
and a new Event enum for use with methods like Client.wait_for().
Breaking Changes¶
- StickerPack.cover_sticker_id,- .cover_stickerand- .bannerare now optional and may return- None. (#912)
- AuditLogEntry.usermay now be an- Objectif the user cannot be found, particularly in entries from the- on_audit_log_entry_create()event. (#920)
New Features¶
- Add - GuildBuilderand- Client.guild_builder()for full coverage of the guild creation endpoint. (#578)
- Support regex within automod using - AutoModTriggerMetadata.regex_patterns. (#794)
- Add - File.closedand- File.bytes_lengthproperties. (#839)
- Add support for NSFW application commands. (#865)
- Add - nsfwparameter to command constructors and decorators.
 
 
- Add - UserFlags.active_developerand- PublicUserFlags.active_developer. (#866)
- Adds reasons/descriptions to - ConnectionClosederrors. (#873)
- Update - AutoModTriggerMetadataoverloads to allow passing- allow_listto keyword-based rules. (#877)
- The - PublicUserFlags.discord_certified_moderatoris now an alias of- PublicUserFlags.moderator_programs_alumni. (#883)
- Add - ForumChannel.default_layout, and- default_layoutparameter to channel edit methods. (#885, #903)
- Adds - Eventenumeration to use in- Client.wait_for(),- disnake.ext.commands.Bot.wait_for()and in- disnake.ext.commands.Bot.listen()decorator. (#895)
- Add new - MessageType.interaction_premium_upselland- MessageType.guild_application_premium_subscriptionmessage types. (#905)
- Add application role connection features. (#906)
- Add - ApplicationRoleConnectionMetadataand- ApplicationRoleConnectionMetadataTypetypes.
- Add - Client.fetch_role_connection_metadataand- Client.edit_role_connection_metadatamethods.
- Add - RoleTags.is_linked_roleand- AppInfo.role_connections_verification_urlattributes.
 
 
- Add - StickerFormatType.gif. (#910)
- Add support for the - on_audit_log_entry_create()gateway event, and add- Intents.moderationintent.- Intents.bansis now an alias of- Intents.moderation. (#915)
- Add fallback to - Objectfor- AuditLogEntry.user(#920)
Bug Fixes¶
- [ext.commands] Fix - help_commandparameter annotations to allow- Nonevalue. (#849)
- Fix user cache memory leak where unused objects weren’t being evicted (provided that - Intents.membersis enabled). (#858)
- Fix - Message.author.public_flagsalways being- 0when the member cache is disabled. (#870)
- Export missing - ThreadWithMessageclass. (#879)
- Add previously missing - applied_tagsparameter to all- ForumChannel.create_thread()overloads. (#880)
- Fix conversion of custom emoji strings (e.g. - <:this:934852112221872198>) in- Message.add_reaction()and similar methods to more strictly adhere to the API documentation. (#887)
- Fix - Client.delete_guild_command()not updating the local command cache. (#907)
- Fix errors when trying to deserialize stickers with unknown formats. (#911) 
- Make - StickerPack.cover_sticker_id,- .cover_stickerand- .banneroptional. (#912)
- Fix handling of - ECONNRESETerrors on Linux. (#921)
Documentation¶
- Enable OpenSearch, allowing easy integration of the search functionality into browsers. (#859) 
- Remove documentation regarding private threads requiring boosts. (#872) 
- Update - AutoModTriggerMetadatafield limits. (#877)
Miscellaneous¶
v2.7.2¶
Bug Fixes¶
- Fix - VoiceClientnot continuing to play audio when moving between channels. (#845)
- Fix KeepAlive logging un-intentionally attempting to interpolate stack trace logger calls (#940) 
- Fix attribute error when attempting to access - DMChannel.flagsunder certain circumstances. (#960)
- Fix voice connection discovery using incorrect packet sizes. (#967) 
v2.7.1¶
Bug Fixes¶
- Fix - Message.author.public_flagsalways being- 0when the member cache is disabled. (#870)
- Export missing - ThreadWithMessageclass. (#879)
- Fix - Client.delete_guild_command()not updating the local command cache. (#907)
- Fix errors when trying to deserialize stickers with unknown formats. (#911) 
v2.7.0¶
This release comes with support for python 3.11 and new selects.
Breaking Changes¶
- Properly document that - Message.system_contentmay return- None. While this is documented as a breaking change, this function always could return- Noneif the message type was not recognised. (#766)
- Rename - InteractionDataResolved.get()to- get_by_id(). (#814)
Deprecations¶
- Rename - ApplicationCommandInteractionDataResolvedto- InteractionDataResolved. (#814)
- [ext.commands] Deprecate the - sync_commands,- sync_commands_debug, and- sync_commands_on_cog_unloadparameters of- Botand- InteractionBot. These have been replaced with the- command_sync_flagsparameter which takes a- CommandSyncFlagsinstance. (#806)
New Features¶
- Update Message.system_contentto be accurate to the client as of October 2022. (#766)
- This also properly documents that it is possible to return - None.
 
 
- Update 
- Add type hints to all flag constructors, now supporting type-checking for creating flag classes (e.g. - Intents(members=True)) which used to be untyped. (#778)
- Add - GuildScheduledEvent.start(),- .endand- .cancelshortcuts. (#781)
- Improve the cli, allowing the usage of - ext.commands.InteractionBot,- ext.commands.AutoShardedInteractionBot. (#791)
- Add new select menu components. (#800, #803)
- Add new - ComponentTypevalues.
- Add - UserSelectMenu,- RoleSelectMenu,- MentionableSelectMenu,- ChannelSelectMenucomponents.
- Add - ui.UserSelect,- ui.RoleSelect,- ui.MentionableSelect,- ui.ChannelSelectUI types.
- Add - ui.user_select(),- ui.role_select(),- ui.mentionable_select(),- ui.channel_select()decorators.
- Add - ui.ActionRow.add_user_select(),- add_role_select(),- add_mentionable_select(),- add_channel_select()
- Renamed string select types for clarity (previous names will continue to work):
- SelectMenu->- StringSelectMenu
- ui.Select->- ui.StringSelect
- ui.select()->- ui.string_select()
- ui.ActionRow.add_select()->- ui.ActionRow.add_string_select()
 
 
- Add - MessageInteraction.resolved_valuesand- MessageInteractionData.resolved.
 
 
- Support - delete_afterparameter when sending ephemeral interaction responses. (#816)
- Allow - slowmode_delayparameter of- ForumChannel.create_thread()to be optional. (#822)
- Add - suppress_embedsparameter to- Interaction.edit_original_response()and- InteractionMessage.edit(). (#832)
- [ext.commands] Add - CommandSyncFlagsto provide sync configuration to- Botand- InteractionBot(and their autosharded variants) as- command_sync_flags. (#265, #433, #468, #806)
Bug Fixes¶
- Add the missing attributes for - PermissionOverwrite:- use_application_commandsand- use_embedded_activities. (#777)
- Ensure that embed fields are copied properly by - Embed.copy()and that the copied embed is completely separate from the original one. (#792)
- Fix an issue with - Member.ban()erroring when the- delete_message_daysparameter was provided. (#810)
- Try to get threads used in interactions (like threads in command arguments) from the cache first, before creating a new instance. (#814) 
- Fix creation of threads in text channels without - Permissions.manage_threads. (#818)
- Fix off-by-one error in - AutoModKeywordPresetsvalues. (#820)
- Update event loop handling to avoid warnings when running on Python 3.11. (#827) 
- [ext.commands] Fix a case where optional variadic arguments could have infinite loops in parsing depending on the user input. (#825) 
Documentation¶
- Speed up page load by changing hoverxref tooltips to be lazily loaded. (#393) 
- Remove reference to the v1.0 migration guide from the main index page, and move legacy changelogs to a separate page. (#697) 
- Add a note warning mentioning that using a - disnake.Fileobject as file kwarg makes a- disnake.Embednot reusable. (#786)
- Update broken Discord API Docs links, add - :ddocs:role for easily creating links to the API documentation. (#793)
- Add a custom 404 page for when the navigated page does not exist. (#797) 
Miscellaneous¶
v2.6.3¶
This maintenance release contains backports from v2.8.0.
Bug Fixes¶
- Fix - Message.author.public_flagsalways being- 0when the member cache is disabled. (#870)
- Export missing - ThreadWithMessageclass. (#879)
- Fix - Client.delete_guild_command()not updating the local command cache. (#907)
- Fix errors when trying to deserialize stickers with unknown formats. (#911) 
v2.6.2¶
This maintenance release contains backports from v2.7.0.
Bug Fixes¶
- Fix creation of threads in text channels without - Permissions.manage_threads. (#818)
- Fix off-by-one error in - AutoModKeywordPresetsvalues. (#820)
- [ext.commands] Fix a case where optional variadic arguments could have infinite loops in parsing depending on the user input. (#825) 
v2.6.1¶
This maintenance release contains backports from v2.7.0.
Bug Fixes¶
- Ensure that embed fields are copied properly by - Embed.copy()and that the copied embed is completely separate from the original one. (#792)
- Fix an issue with - Member.ban()erroring when the- delete_message_daysparameter was provided. (#810)
v2.6.0¶
This release adds support for new forum channel features (like tags) as well as auto moderation, among other things. See below for more.
Also note the breaking changes listed below, which may require additional code changes.
Breaking Changes¶
- Update Clientclasses such that their initialization kwargs are explicitly stated and typehinted. (#371)
- Replaced - **kwargs/- **optionswith explicit keyword arguments for the- __init__methods of- Client,- ext.commands.Bot,- ext.commands.InteractionBot, all- AutoSharded*variants, and all relevant parent classes.
 
 
- Update 
- Call new - disnake.on_gateway_error()instead of letting exceptions propagate that occurred while deserializing a received gateway event. (#401)
- Rework Embedinternals. (#435)
- Embed.set_footer()now requires the- textparameter.
- Embed.typeis now optional, although this could previously be- Embed.Empty.
- EmptyEmbedand- Embed.Emptyare deprecated in favor of- None, have been removed from the documentation, and will result in type-checking errors.
 
 
- Rework 
- Refactor ui.ActionRowwith complete typings. (#462)
- ui.ActionRow.childrennow returns an immutable- Sequenceinstead of a- list.
 
 
- Refactor 
- Remove - InvalidArgumentand replace it with- TypeErrorand- ValueError. (#471)
- Rename - channel_idparameter to- channelon- Guild.create_scheduled_eventand- GuildScheduledEvent.edit(). (#548, #590)
- Raise - TypeErrorinstead of- ValueErrorin- GuildScheduledEventvalidation. (#560)
- Assume the local timezone instead of UTC when providing naive datetimes to scheduled event related methods. (#579) 
- Update ModalInteractiontypings. (#583)
- ModalInteraction.walk_componentsis replaced by- ModalInteraction.walk_raw_components().
 
 
- Update 
- Change the default of the - ignore_timeoutparameter for all- permissions_formethods to- False. (#672)
- Update activity attributes to match API types. (#685)
- Make - Spotify.start,- Spotify.end,- Spotify.durationoptional.
- Remove - Activity.timestamps, values are accessible through- Activity.start,- Activity.end.
- Change type of - Activity.buttonsto List[- str].
 
 
- Remove - WidgetMember.nick;- WidgetMember.namecontains the member’s nickname, if set. (#736)
- [ext.commands] Change - has_permissionsand- bot_has_permissionschecks to take timeouts into consideration. (#318, #672)
- [ext.commands] Change - commands.register_injectionto now return an instance of- Injection. (#669)
- [ext.commands] Changed parameters of SubCommandandSubCommandGroupto now require their parent command. (#759)
- This only affects code that creates an instance of SubCommand or SubCommandGroup manually by calling their constructors. 
 
 
- [ext.commands] Changed parameters of 
- [ext.tasks] Change - ext.tasks.Loopto use keyword-only parameters. (#655)
Deprecations¶
- EmptyEmbedand- Embed.Emptyare deprecated in favor of- None, have been removed from the documentation, and will result in type-checking errors. (#435, #768)
- The - delete_message_daysparameter of- Guild.ban()and- Member.ban()is deprecated in favour of- clean_history_duration. (#659)
- [ext.commands] Using - command_prefix=Nonewith- Botis now deprecated in favour of- InteractionBot. (#689)
New Features¶
- Add custom type support for - disnake.ui.button()and- disnake.ui.select()decorators using- clsparameter. (#281)
- Add - disnake.on_gateway_error(),- Client.on_gateway_error()and- enable_gateway_error_handlerclient parameter. (#401)
- Update channel edit method annotations. (#418)
- slowmode_delayand- default_auto_archive_durationare now optional.
- categorymay now be any- abc.Snowflake, not necessarily a- CategoryChannel.
 
 
- Add new ui.ActionRowmethods:insert_item(),clear_items(),remove_item(),pop(), as well as anindexparameter foradd_button(). (#462)
- Also support item access/deletion through - row[i].
 
 
- Add new 
- Expose the icon and recipient data for - Invites whose target is a channel of type- ChannelType.group. (#498)
- Implement auto moderation. (#530, #698, #757)
- New types: - AutoModAction,- AutoModTriggerMetadata,- AutoModRule,- AutoModActionExecution
- New enums: - AutoModTriggerType,- AutoModEventType,- AutoModActionType
- New flags: - AutoModKeywordPresets
- New methods: - Guild.create_automod_rule(),- Guild.fetch_automod_rule(),- Guild.fetch_automod_rules()
- New intents: - Intents.automod_configuration,- Intents.automod_execution(+- Intents.automodshortcut for both)
- New events: - on_automod_rule_create(),- on_automod_rule_update(),- on_automod_rule_delete(),- on_automod_action_execution()
- + all the relevant - AuditLogEntryand- AuditLogChangesfields.
 
 
- Expose additional provided objects by Discord in audit log handling. (#532)
- Also adds - PartialIntegration, and an- integrationattribute on- AuditLogEntry.extrawhen the type is- AuditLogAction.application_command_permission_update.
 
 
- Add - Webhook.application_idfor accessing the ID of the app that created the webhook, if any. (#534)
- Use SessionStartLimit.remainingwhen attempting to connect to Discord. (#537)
- Now raises - SessionStartLimitReachedif there are not enough remaining starts to start the client.
 
 
- Use 
- Add multiple converters for previously undocumented fields for audit logs. (#546) - AuditLogDiffcan now have the following attributes with the specified types:- AuditLogDiff.unicode_emoji, used for role icons, was renamed to- AuditLogDiff.emoji.
- Implement - ChannelFlagson all channel types. (#547)
- Make all *InteractionData dataclasses dicts ( - MessageInteractionData,- ApplicationCommandInteractionData, and so on). (#549)
- Add support for - Webhookin- ForumChannelinstances. (#550)
- Add - GuildScheduledEvent.created_atand- GuildScheduledEvent.urlproperties. (#561)
- Add the - Embed.check_limits()method to check if an Embed would be rejected from Discord. (#567)
- Add - bitrateparameter to- Guild.create_stage_channel(). (#571)
- Add - Guild.edit_mfa_level()for modifying the guild’s MFA level. (#574)
- Add the - slowmode_delayparameter to- Guild.create_voice_channel(). (#582)
- Add the - Interaction.app_permissionsproperty, which shows the app permissions in the channel. (#586)
- Allow - entity_typeparameter- Guild.create_scheduled_eventto be missing. (#590)
- Add - min_lengthand- max_lengthsupport to- Optionand- ext.commands.Param. (#593)
- Add - AllowedMentions.from_messagefor constructing an allowed mentions object from a- Message. (#603)
- Add support of more operators to all Flagclasses. This list includesIntentsandPermissions. (#605, #615, #616)
- &,- |,- ^, and- ~bitwise operator support.
- <,- <=,- >, and- >=comparison operator support.
- Support - |operators between flag instances and flag values.
- Support - ~operator on flag values, which create a flag instance with all except this specific flag enabled.
- Support - |operators between flag values which create a flag instance with both flag values enabled.
 
 
- Add support of more operators to all 
- Support passing raw integer value to - Intentsconstructor. (#613)
- Add - GuildScheduledEventStatus.cancelledas an alias for- canceled. (#630)
- Add - on_raw_member_remove()and- on_raw_member_update()events, with the- RawGuildMemberRemoveEventmodel. (#638)
- Add - Thread.message_count,- Thread.total_message_sentand- Message.positionattributes. (#640)
- Add support for setting - ChannelFlagsdirectly when editing a channel or thread. (#642)
- Add - ApplicationFlags.application_command_badgeflag which shows whether an application has at least one globally registered application command. (#649)
- Add support for - Interaction.datawhich guarantees that every subclass of- Interactionhas the- dataattribute. (#654)
- Add - clean_history_durationparameter to- Guild.ban()and- Member.ban(). (#659)
- Add - Game.assets. (#685)
- Add permission typings to all methods that take permissions directly, for example - disnake.abc.GuildChannel.set_permissions()and- disnake.ext.commands.bot_has_permissions()to name a few. (#708)
- Add - GatewayParamsfor configuring gateway connection parameters (e.g. disabling compression). (#709)
- Add - resume_gateway_urlhandling to gateway/websocket resume flow. (#709, #769)
- Add support for modifying the - INVITES_DISABLEDguild feature using- Guild.edit(). (#718)
- Implement remaining forum channel features. (#724)
- Add - ForumTagdataclass.
- Add - ForumChannel.get_tag(),- ForumChannel.get_tag_by_name(),- Thread.add_tags()and- Thread.remove_tags().
- Add - ForumChannel.default_thread_slowmode_delay,- ForumChannel.default_reaction, and- ForumChannel.default_sort_order.
- New audit log fields for the above features. 
 
 
- Add - BotIntegration.scopes. (#729)
- Return the - disnake.ui.Viewinstance from- View.add_item,- View.remove_itemand- View.clear_itemsto allow for fluent-style chaining. (#733)
- Add - Widget.presence_count. (#736)
- Add - InteractionResponse.type, which contains the type of the response made, if any. (#737)
- Add aliases to the original_messagemethods. (#738)
 
- Add aliases to the 
- Change ForumChannel.create_thread()to not require thecontentparameter to be provided. (#739)
- Like - TextChannel.send(), at least one of- content,- embed/- embeds,- file/- files,- stickers,- components, or- viewmust be provided.
 
 
- Change 
- Return the disnake.ui.ActionRowinstance on multiple methods to allow for fluent-style chaining. (#740)
- This applies to - ActionRow.append_item,- ActionRow.insert_item,- ActionRow.add_button,- ActionRow.add_select,- ActionRow.add_text_input,- ActionRow.clear_items, and- ActionRow.remove_item.
 
 
- Return the 
- Add support for equality checks between two - disnake.Embeds. (#742)
- Add - Permissions.use_embedded_activitiesas an alias for- Permissions.start_embedded_activities. (#754)
- Add - Permissions.use_application_commandsas an alias for- Permissions.use_slash_commands. (#755)
- Support setting - with_messageparameter of- InteractionResponse.deferfor modal interactions to- False. (#758)
- [ext.commands] Add a way to get the parent or root commands of slash commands. (#277)
 
- [ext.commands] Introduce - commands.Stringfor defining string option length limitations. (#593)
- [ext.commands] Add support for Union[ - User,- Role] and Union[- User,- Member,- Role] annotations in slash commands. (#595)
- [ext.commands] Add support for injected parameters autocompletion (#670)
- Add - Injection.autocompletedecorator
- Add - autocompleterskeyword-only argument to- Injection,- inject, and- register_injection
 
 
- [ext.tasks] Add support for subclassing - ext.tasks.Loopand using subclasses in- ext.tasks.loop()decorator. (#655)
Bug Fixes¶
- Update incorrect channel edit method annotations. (#418)
- Fix - sync_permissionsparameter type.
- Remove - topicparameter 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 - GuildStickerlimit to 5. (#531)
- Handle optional - Localeinstances (no longer create an enum value). (#533)
- Update the type field handling for audit logs. (#535)
- AuditLogDiff.typeobjects are no longer always- ChannelTypeinstances.
 
 
- Dispatch - disnake.on_reaction_remove()for- Threadinstances. (#536)
- Update - Guild.bitrate_limitto use the correct value for the- VIP_REGIONSfeature flag. (#538)
- Handle - ThreadAutoArchiveDurationinstances for- default_auto_archive_durationwhen editing channels. (#568)
- Assume that - Noneis an empty channel name and keep- channel.namea string. (#569)
- Remove the - $prefix from- IDENTIFYpayload 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 - PartialMessageablefor 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.durationraising- KeyErrorinstead 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 - COMMUNITYfeature for a- Guild. (#705)
- Fix invalid widget fields. (#736)
- Widget.invite_urland- Widget.fetch_inviteare now optional.
- WidgetMember.avatarand- WidgetMember.activitynow work properly and no longer always raise an exception or return- None.
 
 
- 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_countand- Thread.total_message_sent. (#747)
- [ext.commands] Handle - VoiceChannelin- 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_permissionsand- bot_has_permissionschecks to work with interactions in guilds that only added the- applications.commandsscope, 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¶
- Add sidebar-navigable sub-sections to Event Reference section of API Reference documentation. (#460) 
- Remove notes that global application command rollout takes up to an hour. (#518) 
- Update sphinx from 4.4.0 to version 5.1, and take advantage of new options. (#522, #565) 
- Update the requests intersphinx url to the new url of the requests documentation. (#539) 
- Build an htmlzip version of the documentation for downloading. (#541) 
- Expand and complete the attribute documentation for - AuditLogDiff. (#546)
- Add note about currently required client override for slash localisations. (#553) 
- Restructure the - examples/directory, and update + clean up all examples. (#562, #716)
- Clarify vanity invite handling in - Guild.invites. (#576)
- Clarify the targets of - Permissions.is_strict_subset()and- Permissions.is_strict_superset(). (#612)
- Clarify when the user is a - Memberor a- Userin- disnake.on_member_ban()events. (#623)
- Update - InteractionReference.namedescription, now includes group and subcommand. (#625, #648)
- Note that - Interaction.channelmay be a- PartialMessageablein inaccessible threads, in addition to DMs. (#632)
- Fix the grammatical errors in - Guildchannel properties. (#645)
- Update fields listed in - on_user_update()and- on_member_update()docs. (#671)
- Add previously missing inherited attributes to activity types. (#685) 
- Add documentation for the - strictparameter to- Client.get_or_fetch_user()and- Guild.get_or_fetch_member(). (#710)
- Remove note about application command localization requiring a client build override. (#711) 
- Change references to public guilds to reference the - COMMUNITYfeature instead. (#720)
- Clarify - Thread.delete()criteria for threads in forum channels. (#745)
- Clarify behavior of kwargs in flag methods when both a flag and an alias are given. (#749) 
- [ext.commands] Document the - i18nattribute on- ext.commands.Botand- ext.commands.InteractionBotclasses. (#652)
- [ext.commands] Document - commands.Injection. (#669)
- [ext.commands] Improve documentation around using - Nonefor- Bot.command_prefix. (#689)
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 - flake8as 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 compatibility 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 towncrierandsphinxcontrib-towncrierto manage changelogs. (#600)
- Use - towncrierfor changelog management.
- Use - sphinxcontrib-towncrierto build changelogs for the in-development documentation.
 
 
- Add 
- 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__.pyfiles.
- Don’t use ambiguous variable names. 
- Don’t use setattr and getattr with constant variable names. 
 
 
- Add - flake8-pytest-stylefor linting pytest specific features with flake8. (#608)
- Replace all - TypeVarinstances with- typing_extensions.Selfacross the entire library where possible. (#610)
- Remove the internal - fill_with_flagsdecorator for flags classes and use the built in- object.__init_subclass__()method. (#616, #660)
- Add - sliceto- 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.flagsto- disnake.ext.commands.flag_converter. (#667)
- Improve parallel documentation build speed. (#690) 
- Limit installation of - cchardetin the- [speed]extra to Python versions below 3.10 (see aiohttp#6857). (#702)
- Update annotation and description of - optionsparameter of- ui.ActionRow.add_selectto match- ui.Select. (#744)
- Update typings to explicitly specify optional types for parameters with a - Nonedefault. (#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¶
- Fix creation of forum threads without - Permissions.manage_threads. (#746)
- [ext.commands] Fix edge case with parsing command annotations that contain a union of non-type objects, like - Optional[Literal[1, 2, 3]]. (#771)
Miscellaneous¶
- Limit installation of - cchardetin 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 - GuildStickerlimit to 5. (#531)
- Handle optional - Localeinstances (no longer create an enum value). (#533)
- [ext.commands] Handle - VoiceChannelin- commands.is_nsfw(). (#536)
- Dispatch - disnake.on_reaction_remove()for- Threadinstances. (#536)
- Update - Guild.bitrate_limitto use the correct value for the- VIP_REGIONSfeature flag. (#538)
- Make all *InteractionData dataclasses dicts ( - MessageInteractionData,- ApplicationCommandInteractionData, and so on). (#549)
- Handle - ThreadAutoArchiveDurationinstances for- default_auto_archive_durationwhen editing channels. (#568)
- Assume that - Noneis an empty channel name and keep- channel.namea string. (#569)
- Remove the - $prefix from- IDENTIFYpayload 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 - PartialMessageablefor unhandled/unknown channels instead of using- None. (#646)
Documentation¶
- Remove notes that global application command rollout takes up to an hour. (#518) 
- Update the requests intersphinx url to the new url of the requests documentation. (#539) 
- Clarify the targets of - Permissions.is_strict_subset()and- Permissions.is_strict_superset(). (#612)
- Update - InteractionReference.namedescription, now includes group and subcommand. (#625, #648)
v2.5.1¶
Bug Fixes¶
- [ext.commands] Fix - autocomplete()decorator in cogs (#521)
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_contentintent 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_permissionand- commands.guild_permissionsin favor of new fields/methods - see below for all new changes (#405)
- TextChannel.create_thread()now requires either a- messageor a- typeparameter (#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_firstparameter (#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 - VoiceRegiondata class (#477)
- localeattributes are now of type- Localeinstead of- str(#439)
- Invite.revokedand- Thread.archiver_idhave been removed (deprecated in 2.4) (#455)
- Slash command names and option names are no longer automatically converted to lowercase, an - InvalidArgumentexception is now raised instead (#422)
- The - interactionparameter of- ui.Item.callback()can no longer be passed as a kwarg (#311)
- The - youtube,- awkwordand- 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 - LargeIntnow raises a- LargeIntConversionFailure(#362)
Deprecations¶
- Public stages and stage discoverability are deprecated and no longer supported (#287) 
- Voice regions on guild level are deprecated and no longer have any effect; they should be set on a per-channel basis instead (#357, #374) 
- Guild.create_integration(),- Integration.delete(),- StreamIntegration.edit()and- StreamIntegration.sync()can’t be used by bots anymore and will be removed in a future version (#361)
- AppInfo.summary,- PartialAppInfo.summaryand- IntegrationApplication.summaryare deprecated, use- .descriptioninstead (#369)
- The - suppressparameter for edit methods has been deprecated in favor of- suppress_embeds, with unchanged functionality (#474)
New Features¶
- Support API v10 (#353)
- New intent: - Intents.message_content
- [ext.commands] New warning: - MessageContentPrefixWarning
 
 
- Add forum channels (#448, #479, #504, #512)
- Add - ForumChannel
- Add - CategoryChannel.create_forum_channel,- Guild.create_forum_channel
- Add - pinnedparameter to- Thread.edit()
- Add - Permissions.create_forum_threads, alias of- send_messages
 
 
- Add application command localizations, see Localizations (#269)
- Most - nameand- descriptionparameters now also accept a- Localizedobject
- Update docstring parsing to accommodate for localizations 
- Add - Client.i18n
- Add - localization_providerand- strict_localizationparameters to- Client
- Add - with_localizationsparameter to- Client.fetch_global_commands(),- Client.fetch_guild_commands()
- Add localization example 
 
 
- Support permissions v2, see Default Member Permissions (#405)
- Breaking changes:
- Remove support for - default_permission
- Remove - GuildApplicationCommandPermissions.edit(),- PartialGuildApplicationCommandPermissions,- UnresolvedGuildApplicationCommandPermissions
- Remove - Client.edit_command_permissions(),- Client.bulk_edit_command_permissions(),- Client.edit_command_permissions(),- Client.edit_command_permissions()
- Remove - Guild.get_command_permissions(),- Guild.edit_command_permissions(),- Guild.bulk_edit_command_permissions()
- Update behavior of - GuildCommandInteractionannotation to automatically set- dm_permission=Falseinstead of adding a local check, remove support for subcommands
- Add - ApplicationCommandPermissionTypeenum, change type of- ApplicationCommandPermissions.typeto support channel targets
- [ext.commands] Remove - guild_permissions()decorator
- [ext.commands] Remove - sync_permissionsparameter from- Bot
 
 
- New features:
- Add - dm_permissionand- default_member_permissionsparameters to application command objects and decorators
- Add - dm_permission,- default_member_permissionsattributes to- ApplicationCommandand- InvokableApplicationCommand
- Add - ApplicationCommandPermissions.is_everyone()and- ApplicationCommandPermissions.is_all_channels()
- Add - AuditLogAction.application_command_permission_updateenum value and- AuditLogDiff.command_permissions
- [ext.commands] Add - default_member_permissions()decorator, alternative to identically named parameter
 
 
 
 
- Add guild previews (#359)
 
- Add guild widget settings and widget url (#360, #365)
- Change - Guild.edit_widget()return type
 
 
- Add guild welcome screens (#339)
 
- Support - List[str]and- Dict[str, str]in- optionparameter of- disnake.ui.Select(#326)
- Add - Guild.search_members()(#358, #388)
- Add - ModalInteraction.message(#363, #400)
- Support - InteractionResponse.edit_message()for modal interactions, if modal was sent in response to component interaction (#364, #400)
- Support - reasonparameter in- Message.create_thread()and- Thread.delete()(#366)
- Add - StageInstance.guild_scheduled_eventand- StageInstance.guild_scheduled_event_id(#394)
- Add - SessionStartLimitand- Client.session_start_limit(#402)
- Allow passing asset types for most image parameters, in addition to - bytes(#415)
- Update - GuildScheduledEvent.fetch_users()and- Guild.bans()to be async iterators supporting pagination (#428, #442)
- Add - AuditLogDiff.imagefor scheduled event images (#432)
- Add - notify_everyoneparameter to- StageChannel.create_instance()(#440)
- Add - to_file()method to assets, emojis, stickers (#443, #475)
- Add - on_thread_create()event (#445)
- Support - reasonparameter in- Thread.edit()(#454)
- Add - default_auto_archive_durationparameter to- Guild.create_text_channel(), add- nsfwparameter to- Guild.create_voice_channel()(#456)
- Allow providing - attachments=Noneto clear attachments when editing a message (#457)
- Add - __repr__methods to interaction data types (#458)
- Add - VoiceChannel.delete_messages(),- VoiceChannel.purge(),- VoiceChannel.webhooks(),- VoiceChannel.create_webhook(), and improve- VoiceChannel.permissions_for()(#461)
- Add - AppInfo.tags,- AppInfo.install_params,- AppInfo.custom_install_url(#463)
- Add - TextChannel.last_pin_timestamp,- DMChannel.last_pin_timestamp,- Thread.last_pin_timestamp(#464)
- Add temporary workaround for setting API version to avoid message content intent requirement until deadline (#467) 
- Add - Interaction.expires_atand- Interaction.is_expired, automatically fall back to message edit/delete if interaction expired (#469)
- Add - suppress_embedsparameter to message send methods (#474)
- Add - VoiceRegion(replacing voice region enum),- Client.fetch_voice_regions(),- Guild.fetch_voice_regions()(#477)
- Add - Member.role_iconproperty (#485)
- Add debug logging of webhook request/response data (#486) 
- Add - on_raw_thread_delete(),- on_raw_thread_member_remove()and- on_raw_thread_update()events (#495)
- Support creating news channels using - Guild.create_text_channel()(#497)
- Add - Guild.vanity_url_code, add option to- Guild.vanity_invite()to use cached invite code (#502)
- Add - Message.application_id(#513)
- [ext.commands] Add - GuildScheduledEventConverterand- GuildScheduledEventNotFound(#376)
- [ext.commands] Add - extrasto application commands (#483)
- [ext.commands] Add - slash_command_attrs,- user_command_attrsand- message_command_attrs- Cogparameters (#501)
Bug Fixes¶
- Improve components exception message (#352) 
- Use proper HTTP method for joining threads, remove unused methods (#356) 
- Fix missing - create_public_threadspermission in- Permissions.private_channel(#373)
- Improve - abc.Messageable.send()typing and fix annotations of HTTP methods (#378)
- Fix shadowed - disnake.messagemodule (#380)
- Fix missing/incorrect - __slots__(#381)
- Fix role icon/emoji editing (#403) 
- Remove cached scheduled events if associated channel was deleted (#406) 
- Update some types/parameters of roles, scheduled events and voice states (#407) 
- Allow - contentparameters in send/edit methods to be positional (#411)
- Fix gateway ratelimiter being too strict (#413) 
- Fix caching of stage instances and scheduled events (#416) 
- Improve - PartialMessageablechannel handling (#426)
- Use - asyncio.iscoroutinefunction()instead of- inspect.iscoroutinefunction()(#427)
- Don’t automatically enable logging if autoreload is enabled (#431) 
- Support embed images in - InteractionResponse.edit_message()(#466)
- Fix - afterparameter of- Guild.audit_logs()(#473)
- Add - __str__to- ApplicationCommand, improve sync debug output (#478)
- Don’t require a - topicwhen creating a stage channel (#480)
- Update and add missing overloads (#482) 
- Make - disnake.types.interactionsimportable at runtime (#493)
- Raise - TypeErrorinstead of silently returning when trying to defer an unsupported interaction type (#505)
- Fix delay of - aftercallback in- AudioPlayerwhen stopping (#508)
- [ext.commands] Make conversion exceptions in slash commands propagate cleanly as documented (#362) 
- [ext.commands] Fix - clean_contentconverter (#396)
- [ext.commands] Fix usage of custom converters with - Param(#398)
- [ext.commands] Support interactions in - UserConverter,- MemberConverter(#429)
- [ext.commands] Fix unloading of listeners with custom names (#444) 
- [ext.commands] Fix parameter name conflicts in slash commands (#503) 
Documentation¶
- Disable mathjax in documentation to improve loading times (#370) 
- Update return type of - Guild.create_template()(#372)
- Add documentation for - GuildCommandInteraction,- UserCommandInteraction, and- MessageCommandInteraction(#374)
- Fix several bugs of redesign (#377) 
- Update broken references (#419) 
- Fix duplicate search results, improve scoring (#423) 
- Add search hotkeys - ctrl+k,- /,- s(#434)
- Fix string escape warnings (#436) 
- Add several previously missing documentation entries (#446, #470) 
- Add autocomplete decorator example (#472) 
- Update docs of ABCs to mention subclasses (#506) 
- Update - on_member_update()documentation to include new and future attributes (#510)
- Fix miscellaneous issues, improve formatting (#511) 
Miscellaneous¶
v2.4.1¶
This release is a bugfix release with backports from v2.5.0 up to v2.5.2.
Bug Fixes¶
- Fix missing - create_public_threadspermission in- Permissions.private_channel(#373)
- Fix role icon/emoji editing (#403) 
- Remove cached scheduled events if associated channel was deleted (#406) 
- Update some types/parameters of roles, scheduled events and voice states (#407) 
- Allow - contentparameters in send/edit methods to be positional (#411)
- Fix gateway ratelimiter being too strict (#413) 
- Fix caching of stage instances and scheduled events (#416) 
- Improve - PartialMessageablechannel handling (#426)
- Fix delay of - aftercallback in- AudioPlayerwhen stopping (#508)
- Change the default guild - GuildStickerlimit to 5. (#531)
- Dispatch - disnake.on_reaction_remove()for- Threadinstances. (#536)
- Update - Guild.bitrate_limitto use the correct value for the- VIP_REGIONSfeature flag. (#538)
- Remove the - $prefix from- IDENTIFYpayload properties. (#572)
- Fix opus function calls on arm64 macOS. (#620) 
- Improve channel/guild fallback in resolved interaction data, using - PartialMessageablefor unhandled/unknown channels instead of using- None. (#646)
- [ext.commands] Fix - clean_contentconverter (#396)
- [ext.commands] Support interactions in - UserConverter,- MemberConverter(#429)
- [ext.commands] Fix unloading of listeners with custom names (#444) 
- [ext.commands] Handle - VoiceChannelin- commands.is_nsfw(). (#536)
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 ApplicationCommandand its subtypes no longer accepts**kwargsfor setting internal values (#249)
- This shouldn’t affect anyone, as - **kwargswas only used for setting fields returned by the API and had no effect if the user set them
 
 
- The constructor of 
- Interaction.permissionsnow returns proper permission values in DMs (#321)
- The - reasonparameter for sticker endpoints in- HTTPClientis now kwarg-only
Deprecations¶
New Features¶
- Add - Interaction.localeand- Interaction.guild_localeproperties to interactions (#225)
- Add - ui.ActionRowand- componentskwarg to send methods (#224)
- Add ui.WrappedComponentas a base class for all UI components (#253)
- ui.Itemnow inherits from- ui.WrappedComponent. It’s no longer a base class for all UI components.
 
 
- Add 
- Implement modals and text inputs (#253)
- Add - TextInputcomponent.
- Add - ui.Modalas a high-level implementation of modals.
- Add - ui.TextInputfor modals. It inherits from- ui.WrappedComponentand adds more functionality on top of- TextInput.
- Add - InteractionResponse.send_modal()to support new interaction response type.
- Add - on_modal_submit()event.
 
 
- Use logger for application command sync debug (#230) 
- [ext.commands] Improve application command sync algorithm (#240) 
- Use HTTP API v9 (#250) 
- [ext.commands] Add - commands.Range, see Number Ranges (#237, #276, #316)
- [ext.commands] Add - Bot.load_extensionsand- utils.search_directory()(#245)
- [ext.commands] Add - commands.LargeInt(#264)
- Add - with_messageparameter to- InteractionResponse.defer()to support deferring component interaction responses with messages (#248)
- Add - Widget.edit()(#266)
- Add the ability to specify a default color for embeds (#203) 
- Add - PartialInviteGuild.nsfw_leveland- PartialInviteGuild.vanity_url_code(#297)
- Add - Thread.create_timestamp(#285)
- Add - Message.thread(#291)
- Add - Permissions.eventsand- Permissions.private_channel, improve existing factory methods (#286, #321)
- Support images in - GuildScheduledEvent(#280)
- Add - PartyType.sketch_headsand- PartyType.ocho(#306)
- Interaction.bot,- Interaction.client,- Interaction.channeland- Interaction.channel_idare no longer optional (#279)
- Support timeouts in - abc.GuildChannel.permissions_for()and other channel types (#289)
- Support - disnake.Attachmentoptions in slash commands (#226)
- Add - attachmentsparameter to- InteractionResponse.edit_message()(#335)
- Add - Guild.get_or_fetch_members()with an alias- Guild.getch_members()(#322).
- Add - abc.GuildChannel.jump_url,- DMChannel.jump_urland- Thread.jump_url(#319)
Bug Fixes¶
- Fix missing support for - reasonparameter in some methods (#266)
- Improve validation of slash command and option names (#267) 
- [ext.commands] Fix typing of - ctxparameter in- Converter(#292)
- Fix - Guild.get_command()never returning any commands (#333)
- Return list of members from - Guild.chunk()(#334)
- Fix handling of uppercase slash command names (#346) 
- Fix - permissionsannotation of- abc.GuildChannel.set_permissions()(#349)
- Fix - tasks.loopusage with fixed times (#337)
Documentation¶
Miscellaneous¶
- 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¶
- [ext.commands] Fix Python 3.10 union type annotations in slash commands (#231) 
- Fix double - @when mentioning default role (#244)
- Fix a command sync bug which prevented registering two application commands with the same name but different types (#254) 
- Fix bug when editing a - Viewwith URL buttons that resulted in the- rowattribute being reset (#252)
- [ext.commands] Fix - MessageConverternot defaulting to current channel if no channel ID specified (#284)
- Fix attachment descriptions not working after recent API change (#241) 
- Fix incorrect type check in - Guild.create_scheduled_event()using- StagePrivacyLevelinstead of- GuildScheduledEventPrivacyLevel(#263)
- [ext.commands] Fix exceptions that occurred when using a - Unionin a slash command parameter annotation
- [ext.commands] Fix dynamic command cooldowns (#320) 
- Fix type-checking of - guild_ids/- test_guildsparameters which could break application command caching (#300, #325)
- Fix - Guild.create_sticker()not working when no description was provided (#328)
Documentation¶
- Fix - guild_permissions()documentation
- Fix missing dropdown icon (#235) 
Miscellaneous¶
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.0to- >=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 - TextChannelcan 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_commandmay now also return- SubCommandGroupor- SubCommandinstances, see documentation
- disnake.types.ThreadArchiveDurationis now- ThreadArchiveDurationLiteral, to avoid confusion with the new- ThreadArchiveDurationenum
Deprecations¶
- The - role_idsand- user_idsparameters for- guild_permissionsare now- rolesand- usersrespectively; the old parameter names will be removed in a future version
New Features¶
- Add guild scheduled events (#151, #217)
- New intent: - Intents.guild_scheduled_events(enabled by default)
- Invite additions/changes
- guild_scheduled_eventparameter on- abc.GuildChannel.create_invite()
- guild_scheduled_event_idparameter on- Client.fetch_invite()
- Include - eventURL parameter in- Invite.urlif applicable
- Support parsing scheduled event ID from invite URLs 
 
 
 
 
- Add guild timeouts (#161, #221, #223)
- timeoutparameter on- Member.edit()
- New permission: - Permissions.moderate_members
 
 
- Add preliminary support for text-in-voice (#162, #177)
- Many methods/properties that previously returned a - TextChannelcan now also return a- VoiceChannel, which shares many but not all of its methods
- Important notes:
- This feature is only available in a very limited number of servers at the time of writing this, and the API is still being developed; therefore, expect changes in the future 
- Text-in-voice currently does not support these text channel features (note: this is not guaranteed to be an exhaustive list): threads, webhooks, nsfw flags, slowmode 
- The - nsfwand- slowmode_delayvalues/parameters are currently not supported by the API and are still TBD
- Pinned messages are currently not exposed in the client UI, and while the API for them works, their future is uncertain 
 
 
- VoiceChannelnow inherits from- abc.Messageable
- New - VoiceChannelproperties:- .nsfw,- .slowmode_delay,- .last_message_id,- .last_message
- New - VoiceChannelmethods:- .is_nsfw,- .get_partial_message
- nsfwand- slowmode_delayparameters for- VoiceChannel.edit()
 
 
- [ext.commands] Add parameter injections (example) (#130)
 
- Add attachment descriptions (see - File,- Attachment) (#100)
- Add - on_raw_typing()event (#176)
- Add - Guild.approximate_member_countand- Guild.approximate_presence_count(available on manually fetched guilds) (#139)
- Add - ThreadArchiveDurationenum, containing the currently valid values for the thread auto-archive feature (#187)
- [ext.commands] Add - PermissionsConverter, which allows the conversion of a value or a (list of) permission names to a- Permissionsinstance (using a- Permissionsannotation)
- Add - AppInfo.flags
- [ext.commands] Add - channel_typesparameter to- Param/- ParamInfo(#130)
- Add support for setting - slowmode_delayon thread creation (- TextChannel.create_thread(),- Message.create_thread()) (#132)
- Add - invitableparameter to- TextChannel.create_thread()(#132)
- Add - fail_if_not_existsparameter to- Message.reply()(#199, #211)
- [ext.commands] - Bot.get_slash_commandnow works similar to- Bot.get_command, in that it can also return subcommands/groups for inputs like- "foo bar"(#149)
- Add new aliases for - ApplicationCommandInteraction:- CommandInteraction,- CmdInteraction,- CommandInter,- CmdInter,- AppCommandInteraction
- Add a base class for warnings emitted by this library, - DiscordWarning(#118)
- Add new warnings (emitted instead of just using - printfor warnings):- ConfigWarning,- SyncWarning(#118)
Bug Fixes¶
- Fix dispatch of typing events in DMs (#176) 
- Try to retrieve objects in received interactions from cache first (fixing properties like - Member.statuson 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- orjsonif available (#184)
- Fix - Message.channeltype being- DMChannelfor 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¶
- Move documentation to https://docs.disnake.dev/ 
- Update Version Guarantees (#200) 
- Clarify - Interaction.original_message()documentation regarding different response types (#140)
- Clarify - Interaction.send()documentation (#188)
- Redirect searches for - colorto- colour(#153)
- Add documentation for new guild feature values (#148) 
- Add documentation for several methods/properties: (#153)
 
- Fix incorrect type for - Invite.channelin documentation
- Add additional information about application command sync algorithm and syncing commands in sharded bots (#205) 
Miscellaneous¶
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_commandin autocomplete callbacks
- Fix - Select.append_optionnot raising an error if 25 options have already been added
- Improve check for - optionsparameter on slash commands and subcommands
- Improve parameter parsing for converters 
- Fix warning related to new option properties 
Documentation¶
- Update repository links to new organization 
- Fix duplicate entries in documentation 
- Fix incorrect - versionaddedtags
- Add documentation for - InteractionBotand- AutoShardedInteractionBot
v2.2.1¶
Bug Fixes¶
- Fixed error related to guild member count 
v2.2.0¶
New Features¶
- Add kwarg - attachmentsto edit methods
- Add kwargs - fileand- filesto- InteractionResponse.edit_message(),- PartialMessage.edit()and- Message.edit()
- Add kwarg - fileto- Embed.set_image()and- Embed.set_thumbnail()
- Add kwarg - delayto- Interaction.delete_original_message()and- WebhookMessage.delete()
- Add kwarg - delete_afterto- InteractionResponse.send_message()and- WebhookMessage.send()
- [ext.commands] Add - InvokableSlashCommand.autocomplete(alternative method of adding autocomplete functions)
- [ext.commands] Add - SubCommand.autocomplete(alternative method of adding autocomplete functions)
- [ext.commands] Add - Cog.cog_load
- [ext.commands] Error handlers now can cancel each other by returning - True
v2.1.5¶
New Features¶
- Add - UnresolvedGuildApplicationCommandPermissions
- Add kwargs - min_valueand- max_valuein- Option
- [ext.commands] Add kwarg - min_value(with aliases- ge,- gt) to- Param
- [ext.commands] Add kwarg - max_value(with aliases- le,- lt) to- Param
- [ext.commands] Add kwarg - ownerto- guild_permissions
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¶
- Add - PartialGuildApplicationCommandPermissions
- Add - ApplicationCommandInteraction.filled_optionsproperty
- [ext.commands] Add - InteractionBot
- [ext.commands] Add - guild_permissions
- [ext.commands] Add kwargs - sync_commands_on_cog_unloadand- sync_permissionsto- InteractionBotBase
Bug Fixes¶
- Music 
- default_permissionkwarg 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¶
- Add interaction hierarchy. - Interactionis now the base class for other interaction types, such as- ApplicationCommandInteractionand- MessageInteraction.
- Add interaction data wrappers: - ApplicationCommandInteractionDataand- MessageInteractionData.
- Add interaction data option wrapper: - ApplicationCommandInteractionDataOption
- Add - Client.bulk_edit_command_permissions()
- Add - Client.edit_command_permissions()
- [ext.commands] Support for slash commands and context menus. 
- [ext.commands] Add - InvokableApplicationCommand- the base class for invocable slash commands and context menus.
- [ext.commands] Add - InvokableSlashCommandfor slash command management.
- [ext.commands] Add - SubCommandfor slash sub-command management.
- [ext.commands] Add - SubCommandGroupfor slash sub-command group management.
- [ext.commands] Add - InvokableUserCommandfor user command management (context menus).
- [ext.commands] Add - InvokableMessageCommandfor message command management (context menus).
- [ext.commands] Add - ParamInfofor wrapping annotations.
- [ext.commands] Add - slash_commandfor slash command definitions.
- [ext.commands] Add - user_commandfor user command definitions (context menus).
- [ext.commands] Add - message_commandfor message command definitions (context menus).
- [ext.commands] Add - Param(with an alias- param) in case- ParamInfocauses linter errors.
- [ext.commands] Add - Bot.slash_commandfor slash command definitions.
- [ext.commands] Add - Bot.user_commandfor user command definitions (context menus).
- [ext.commands] Add - Bot.message_commandfor message command definitions (context menus).
- [ext.commands] Add - Bot.after_slash_command_invoke- a decorator for post-invoke hooks for slash commands.
- [ext.commands] Add - Bot.after_user_command_invoke- a decorator for post-invoke hooks for user commands.
- [ext.commands] Add - Bot.after_message_command_invoke- a decorator for post-invoke hooks for message commands.
- [ext.commands] Add - Bot.before_slash_command_invoke- a decorator for pre-invoke hooks for slash commands.
- [ext.commands] Add - Bot.before_user_command_invoke- a decorator for pre-invoke hooks for user commands.
- [ext.commands] Add - Bot.before_message_command_invoke- a decorator for pre-invoke hooks for message commands.
Legacy Changelog¶
Changelogs for older versions (0.x, 1.x) can be found on the Legacy Changelog page.