Changelog¶
This page keeps a detailed human friendly rendering of what’s new and changed in specific versions.
v2.9.0a [UNRELEASED]¶
Deprecations¶
disnake.utils.search_directory()will be removed in a future version, in favor ofdisnake.ext.commands.Bot.find_extensions()which is the most common usecase and is more consistent. (#796)
New Features¶
- [ext.commands] Improve
Bot.load_extensions, addBot.find_extensions. (#796) Better support for more complex extension hierarchies.
New
package,ignore, andload_callbackparameters.
- [ext.commands] Improve
- Add features related to role subscriptions. (#904)
Add
oldest_firstparameter toGuild.audit_logs(). (#919)Add
flagsparameter to message send and edit methods. (#929)- New message types that are sent within
StageChannelinstances: (#942)
- New message types that are sent within
Add support for setting
user_limitandvideo_quality_modewhen creating aStageChannelwithGuild.create_stage_channel(). (#942)Add edit support for
user_limittoStageChannel.edit(). (#942)- Messages can now be sent within
StageChannelinstances. (#942) StageChannelnow inherits fromabc.Messageable- New
StageChannelproperties:
- New
- New
StageChannelmethods: .is_nsfw,.get_partial_message,.delete_messages,.purge,.webhooks,.create_webhook
- New
Add
nsfwandslowmode_delayparameters toGuild.create_stage_channel()andCategoryChannel.create_stage_channel()Add
nsfwandslowmode_delayparameters toStageChannel.edit()Add text related permission support to
StageChannel.permissions_for().
- Messages can now be sent within
- 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)[ext.commands] Add
Bot.get_listeners(). (#976)Add
ApplicationFlags.application_auto_moderation_rule_create_badge(#988)
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
VoiceChannel.permissions_for()not disablingPermissions.manage_webhookswhen the user cannot connect to the channel. (#942)RawTypingEvent.timestampis now a timezone-awaredatetimeinstead of a naive one. (#945)[ext.commands] Allow referencing the same ParamInfo instance in multiple signatures. (#946)
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)
Documentation¶
Update automod rule limits. (#931)
[ext.commands] Fix commands extension events being duplicated in search results. (#944)
Remove incorrect documentation for
InvokableApplicationCommand.invoke(). (#961)Add a searchbox for filtering the sidebar on the API Reference pages. (#963)
Miscellaneous¶
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 returnNone. (#912)AuditLogEntry.usermay now be anObjectif the user cannot be found, particularly in entries from theon_audit_log_entry_create()event. (#920)
New Features¶
Add
GuildBuilderandClient.guild_builder()for full coverage of the guild creation endpoint. (#578)Support regex within automod using
AutoModTriggerMetadata.regex_patterns. (#794)Add
File.closedandFile.bytes_lengthproperties. (#839)- Add support for NSFW application commands. (#865)
Add
nsfwparameter to command constructors and decorators.
Add
UserFlags.active_developerandPublicUserFlags.active_developer. (#866)Adds reasons/descriptions to
ConnectionClosederrors. (#873)Update
AutoModTriggerMetadataoverloads to allow passingallow_listto keyword-based rules. (#877)The
PublicUserFlags.discord_certified_moderatoris now an alias ofPublicUserFlags.moderator_programs_alumni. (#883)Add
ForumChannel.default_layout, anddefault_layoutparameter to channel edit methods. (#885, #903)Adds
Eventenumeration to use inClient.wait_for(),disnake.ext.commands.Bot.wait_for()and indisnake.ext.commands.Bot.listen()decorator. (#895)Add new
MessageType.interaction_premium_upsellandMessageType.guild_application_premium_subscriptionmessage types. (#905)- Add application role connection features. (#906)
Add
ApplicationRoleConnectionMetadataandApplicationRoleConnectionMetadataTypetypes.Add
Client.fetch_role_connection_metadataandClient.edit_role_connection_metadatamethods.Add
RoleTags.is_linked_roleandAppInfo.role_connections_verification_urlattributes.
Add
StickerFormatType.gif. (#910)Add support for the
on_audit_log_entry_create()gateway event, and addIntents.moderationintent.Intents.bansis now an alias ofIntents.moderation. (#915)Add fallback to
ObjectforAuditLogEntry.user(#920)
Bug Fixes¶
[ext.commands] Fix
help_commandparameter annotations to allowNonevalue. (#849)Fix user cache memory leak where unused objects weren’t being evicted (provided that
Intents.membersis enabled). (#858)Fix
Message.author.public_flagsalways being0when the member cache is disabled. (#870)Export missing
ThreadWithMessageclass. (#879)Add previously missing
applied_tagsparameter to allForumChannel.create_thread()overloads. (#880)Fix conversion of custom emoji strings (e.g.
<:this:934852112221872198>) inMessage.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 being0when 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 returnNone. While this is documented as a breaking change, this function always could returnNoneif the message type was not recognised. (#766)Rename
InteractionDataResolved.get()toget_by_id(). (#814)
Deprecations¶
Rename
ApplicationCommandInteractionDataResolvedtoInteractionDataResolved. (#814)[ext.commands] Deprecate the
sync_commands,sync_commands_debug, andsync_commands_on_cog_unloadparameters ofBotandInteractionBot. These have been replaced with thecommand_sync_flagsparameter which takes aCommandSyncFlagsinstance. (#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->StringSelectMenuui.Select->ui.StringSelectui.select()->ui.string_select()ui.ActionRow.add_select()->ui.ActionRow.add_string_select()
Add
MessageInteraction.resolved_valuesandMessageInteractionData.resolved.
Support
delete_afterparameter when sending ephemeral interaction responses. (#816)Allow
slowmode_delayparameter ofForumChannel.create_thread()to be optional. (#822)Add
suppress_embedsparameter toInteraction.edit_original_response()andInteractionMessage.edit(). (#832)[ext.commands] Add
CommandSyncFlagsto provide sync configuration toBotandInteractionBot(and their autosharded variants) ascommand_sync_flags. (#265, #433, #468, #806)
Bug Fixes¶
Add the missing attributes for
PermissionOverwrite:use_application_commandsanduse_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 thedelete_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 adisnake.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 maintainence release contains backports from v2.8.0.
Bug Fixes¶
Fix
Message.author.public_flagsalways being0when 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 maintainence 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 maintainence release contains backports from v2.7.0.
Bug Fixes¶
Ensure that embed fields are copied properly by
Embed.copy()and that the copied embed is completely separate from the original one. (#792)Fix an issue with
Member.ban()erroring when thedelete_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 ofClient,ext.commands.Bot,ext.commands.InteractionBot, allAutoSharded*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 thetextparameter.Embed.typeis now optional, although this could previously beEmbed.Empty.EmptyEmbedandEmbed.Emptyare deprecated in favor ofNone, 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 immutableSequenceinstead of alist.
- Refactor
Remove
InvalidArgumentand replace it withTypeErrorandValueError. (#471)Rename
channel_idparameter tochannelonGuild.create_scheduled_eventandGuildScheduledEvent.edit(). (#548, #590)Raise
TypeErrorinstead ofValueErrorinGuildScheduledEventvalidation. (#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 byModalInteraction.walk_raw_components().
- Update
Change the default of the
ignore_timeoutparameter for allpermissions_formethods toFalse. (#672)- Update activity attributes to match API types. (#685)
Make
Spotify.start,Spotify.end,Spotify.durationoptional.Remove
Activity.timestamps, values are accessible throughActivity.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_permissionsandbot_has_permissionschecks to take timeouts into consideration. (#318, #672)[ext.commands] Change
commands.register_injectionto now return an instance ofInjection. (#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¶
EmptyEmbedandEmbed.Emptyare deprecated in favor ofNone, have been removed from the documentation, and will result in type-checking errors. (#435, #768)The
delete_message_daysparameter ofGuild.ban()andMember.ban()is deprecated in favour ofclean_history_duration. (#659)[ext.commands] Using
command_prefix=NonewithBotis now deprecated in favour ofInteractionBot. (#689)
New Features¶
Add custom type support for
disnake.ui.button()anddisnake.ui.select()decorators usingclsparameter. (#281)Add
disnake.on_gateway_error(),Client.on_gateway_error()andenable_gateway_error_handlerclient parameter. (#401)- Update channel edit method annotations. (#418)
slowmode_delayanddefault_auto_archive_durationare now optional.categorymay now be anyabc.Snowflake, not necessarily aCategoryChannel.
- 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 typeChannelType.group. (#498)- Implement auto moderation. (#530, #698, #757)
New types:
AutoModAction,AutoModTriggerMetadata,AutoModRule,AutoModActionExecutionNew enums:
AutoModTriggerType,AutoModEventType,AutoModActionTypeNew flags:
AutoModKeywordPresetsNew 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
AuditLogEntryandAuditLogChangesfields.
- Expose additional provided objects by Discord in audit log handling. (#532)
Also adds
PartialIntegration, and anintegrationattribute onAuditLogEntry.extrawhen the type isAuditLogAction.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 toAuditLogDiff.emoji.Implement
ChannelFlagson all channel types. (#547)Make all *InteractionData dataclasses dicts (
MessageInteractionData,ApplicationCommandInteractionData, and so on). (#549)Add support for
WebhookinForumChannelinstances. (#550)Add
GuildScheduledEvent.created_atandGuildScheduledEvent.urlproperties. (#561)Add the
Embed.check_limits()method to check if an Embed would be rejected from Discord. (#567)Add
bitrateparameter toGuild.create_stage_channel(). (#571)Add
Guild.edit_mfa_level()for modifying the guild’s MFA level. (#574)Add the
slowmode_delayparameter toGuild.create_voice_channel(). (#582)Add the
Interaction.app_permissionsproperty, which shows the app permissions in the channel. (#586)Allow
entity_typeparameterGuild.create_scheduled_eventto be missing. (#590)Add
min_lengthandmax_lengthsupport toOptionandext.commands.Param. (#593)Add
AllowedMentions.from_messagefor constructing an allowed mentions object from aMessage. (#603)- Add support of more operators to all
Flagclasses. This list includesIntentsandPermissions. (#605, #615, #616) &,|,^, and~bitwise operator support.<,<=,>, and>=comparsion 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 forcanceled. (#630)Add
on_raw_member_remove()andon_raw_member_update()events, with theRawGuildMemberRemoveEventmodel. (#638)Add
Thread.message_count,Thread.total_message_sentandMessage.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 ofInteractionhas thedataattribute. (#654)Add
clean_history_durationparameter toGuild.ban()andMember.ban(). (#659)Add
Game.assets. (#685)Add permission typings to all methods that take permissions directly, for example
disnake.abc.GuildChannel.set_permissions()anddisnake.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 usingGuild.edit(). (#718)- Implement remaining forum channel features. (#724)
Add
ForumTagdataclass.Add
ForumChannel.get_tag(),ForumChannel.get_tag_by_name(),Thread.add_tags()andThread.remove_tags().Add
ForumChannel.default_thread_slowmode_delay,ForumChannel.default_reaction, andForumChannel.default_sort_order.New audit log fields for the above features.
Add
BotIntegration.scopes. (#729)Return the
disnake.ui.Viewinstance fromView.add_item,View.remove_itemandView.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 ofcontent,embed/embeds,file/files,stickers,components, orviewmust 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, andActionRow.remove_item.
- Return the
Add support for equality checks between two
disnake.Embeds. (#742)Add
Permissions.use_embedded_activitiesas an alias forPermissions.start_embedded_activities. (#754)Add
Permissions.use_application_commandsas an alias forPermissions.use_slash_commands. (#755)Support setting
with_messageparameter ofInteractionResponse.deferfor modal interactions toFalse. (#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.autocompletedecoratorAdd
autocompleterskeyword-only argument toInjection,inject, andregister_injection
[ext.tasks] Add support for subclassing
ext.tasks.Loopand using subclasses inext.tasks.loop()decorator. (#655)
Bug Fixes¶
- Update incorrect channel edit method annotations. (#418)
Fix
sync_permissionsparameter type.Remove
topicparameter fromStageChannel.edit(), addbitrate.
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 alwaysChannelTypeinstances.
Dispatch
disnake.on_reaction_remove()forThreadinstances. (#536)Update
Guild.bitrate_limitto use the correct value for theVIP_REGIONSfeature flag. (#538)Handle
ThreadAutoArchiveDurationinstances fordefault_auto_archive_durationwhen editing channels. (#568)Assume that
Noneis an empty channel name and keepchannel.namea string. (#569)Remove the
$prefix fromIDENTIFYpayload 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 usingNone. (#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.durationraisingKeyErrorinstead of returningNone, 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 aGuild. (#705)- Fix invalid widget fields. (#736)
Widget.invite_urlandWidget.fetch_inviteare now optional.WidgetMember.avatarandWidgetMember.activitynow work properly and no longer always raise an exception or returnNone.
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_countandThread.total_message_sent. (#747)[ext.commands] Handle
VoiceChannelincommands.is_nsfw(). (#536)[ext.commands] Handle
Union[User, Member]annotations on slash commands arguments when using the decorator interface. (#584)[ext.commands] Change
has_permissionsandbot_has_permissionschecks to work with interations in guilds that only added theapplications.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()andPermissions.is_strict_superset(). (#612)Clarify when the user is a
Memberor aUserindisnake.on_member_ban()events. (#623)Update
InteractionReference.namedescription, now includes group and subcommand. (#625, #648)Note that
Interaction.channelmay be aPartialMessageablein inaccessible threads, in addition to DMs. (#632)Fix the grammatical errors in
Guildchannel properties. (#645)Update fields listed in
on_user_update()andon_member_update()docs. (#671)Add previously missing inherited attributes to activity types. (#685)
Add documentation for the
strictparameter toClient.get_or_fetch_user()andGuild.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 onext.commands.Botandext.commands.InteractionBotclasses. (#652)[ext.commands] Document
commands.Injection. (#669)[ext.commands] Improve documentation around using
NoneforBot.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 compatibilty with callable/dynamic defaults.
Run docs creation in GitHub actions to test for warnings before a pull is merged. (#564)
Add more typing overrides to
GuildCommandInteraction. (#580)Rework internal typings for interaction payloads. (#588)
Add typings for all gateway payloads. (#594)
- Add
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 ambigious 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 withtyping_extensions.Selfacross the entire library where possible. (#610)Remove the internal
fill_with_flagsdecorator for flags classes and use the built inobject.__init_subclass__()method. (#616, #660)Add
slicetoui.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.flagstodisnake.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 ofui.ActionRow.add_selectto matchui.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
VoiceChannelincommands.is_nsfw(). (#536)Dispatch
disnake.on_reaction_remove()forThreadinstances. (#536)Update
Guild.bitrate_limitto use the correct value for theVIP_REGIONSfeature flag. (#538)Make all *InteractionData dataclasses dicts (
MessageInteractionData,ApplicationCommandInteractionData, and so on). (#549)Handle
ThreadAutoArchiveDurationinstances fordefault_auto_archive_durationwhen editing channels. (#568)Assume that
Noneis an empty channel name and keepchannel.namea string. (#569)Remove the
$prefix fromIDENTIFYpayload 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 usingNone. (#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()andPermissions.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_permissionandcommands.guild_permissionsin favor of new fields/methods - see below for all new changes (#405)TextChannel.create_thread()now requires either amessageor atypeparameter (#355)GuildScheduledEvent.fetch_users()andGuild.bans()now return an async iterator instead of a list of users (#428, #442)Guild.audit_logs()no longer supports theoldest_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, seeon_thread_create()(#445)The voice region enum was replaced with a generic
VoiceRegiondata class (#477)localeattributes are now of typeLocaleinstead ofstr(#439)Invite.revokedandThread.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 ofui.Item.callback()can no longer be passed as a kwarg (#311)The
youtube,awkwordandsketchy_artistPartyTypes 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 aLargeIntConversionFailure(#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()andStreamIntegration.sync()can’t be used by bots anymore and will be removed in a future version (#361)AppInfo.summary,PartialAppInfo.summaryandIntegrationApplication.summaryare deprecated, use.descriptioninstead (#369)The
suppressparameter for edit methods has been deprecated in favor ofsuppress_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
ForumChannelAdd
CategoryChannel.create_forum_channel,Guild.create_forum_channelAdd
pinnedparameter toThread.edit()Add
Permissions.create_forum_threads, alias ofsend_messages
- Add application command localizations, see Localizations (#269)
Most
nameanddescriptionparameters now also accept aLocalizedobjectUpdate docstring parsing to accommodate for localizations
Add
Client.i18nAdd
localization_providerandstrict_localizationparameters toClientAdd
with_localizationsparameter toClient.fetch_global_commands(),Client.fetch_guild_commands()Add localization example
- Support permissions v2, see Permissions (#405)
- Breaking changes:
Remove support for
default_permissionRemove
GuildApplicationCommandPermissions.edit(),PartialGuildApplicationCommandPermissions,UnresolvedGuildApplicationCommandPermissionsRemove
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 setdm_permission=Falseinstead of adding a local check, remove support for subcommandsAdd
ApplicationCommandPermissionTypeenum, change type ofApplicationCommandPermissions.typeto support channel targets[ext.commands] Remove
guild_permissions()decorator[ext.commands] Remove
sync_permissionsparameter fromBot
- New features:
Add
dm_permissionanddefault_member_permissionsparameters to application command objects and decoratorsAdd
dm_permission,default_member_permissionsattributes toApplicationCommandandInvokableApplicationCommandAdd
ApplicationCommandPermissions.is_everyone()andApplicationCommandPermissions.is_all_channels()Add
AuditLogAction.application_command_permission_updateenum value andAuditLogDiff.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]andDict[str, str]inoptionparameter ofdisnake.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 inMessage.create_thread()andThread.delete()(#366)Add
StageInstance.guild_scheduled_eventandStageInstance.guild_scheduled_event_id(#394)Add
SessionStartLimitandClient.session_start_limit(#402)Allow passing asset types for most image parameters, in addition to
bytes(#415)Update
GuildScheduledEvent.fetch_users()andGuild.bans()to be async iterators supporting pagination (#428, #442)Add
AuditLogDiff.imagefor scheduled event images (#432)Add
notify_everyoneparameter toStageChannel.create_instance()(#440)Add
to_file()method to assets, emojis, stickers (#443, #475)Add
on_thread_create()event (#445)Support
reasonparameter inThread.edit()(#454)Add
default_auto_archive_durationparameter toGuild.create_text_channel(), addnsfwparameter toGuild.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 improveVoiceChannel.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_atandInteraction.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()andon_raw_thread_update()events (#495)Support creating news channels using
Guild.create_text_channel()(#497)Add
Guild.vanity_url_code, add option toGuild.vanity_invite()to use cached invite code (#502)Add
Message.application_id(#513)[ext.commands] Add
GuildScheduledEventConverterandGuildScheduledEventNotFound(#376)[ext.commands] Add
extrasto application commands (#483)[ext.commands] Add
slash_command_attrs,user_command_attrsandmessage_command_attrsCogparameters (#501)
Bug Fixes¶
Improve components exception message (#352)
Use proper HTTP method for joining threads, remove unused methods (#356)
Fix missing
create_public_threadspermission inPermissions.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 andd scheduled events (#416)
Improve
PartialMessageablechannel handling (#426)Use
asyncio.iscoroutinefunction()instead ofinspect.iscoroutinefunction()(#427)Don’t automatically enable logging if autoreload is enabled (#431)
Support embed images in
InteractionResponse.edit_message()(#466)Fix
afterparameter ofGuild.audit_logs()(#473)Add
__str__toApplicationCommand, 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 inAudioPlayerwhen 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, andMessageCommandInteraction(#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 inPermissions.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 andd scheduled events (#416)
Improve
PartialMessageablechannel handling (#426)Fix delay of
aftercallback inAudioPlayerwhen stopping (#508)Change the default guild
GuildStickerlimit to 5. (#531)Dispatch
disnake.on_reaction_remove()forThreadinstances. (#536)Update
Guild.bitrate_limitto use the correct value for theVIP_REGIONSfeature flag. (#538)Remove the
$prefix fromIDENTIFYpayload 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 usingNone. (#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
VoiceChannelincommands.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 inHTTPClientis now kwarg-only
Deprecations¶
New Features¶
Add
Interaction.localeandInteraction.guild_localeproperties to interactions (#225)Add
ui.ActionRowandcomponentskwarg to send methods (#224)- Add
ui.WrappedComponentas a base class for all UI components (#253) ui.Itemnow inherits fromui.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 fromui.WrappedComponentand adds more functionality on top ofTextInput.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_extensionsandutils.search_directory()(#245)[ext.commands] Add
commands.LargeInt(#264)Add
with_messageparameter toInteractionResponse.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_levelandPartialInviteGuild.vanity_url_code(#297)Add
Thread.create_timestamp(#285)Add
Message.thread(#291)Add
Permissions.eventsandPermissions.private_channel, improve existing factory methods (#286, #321)Support images in
GuildScheduledEvent(#280)Add
PartyType.sketch_headsandPartyType.ocho(#306)Interaction.bot,Interaction.client,Interaction.channelandInteraction.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 toInteractionResponse.edit_message()(#335)Add
Guild.get_or_fetch_members()with an aliasGuild.getch_members()(#322).Add
abc.GuildChannel.jump_url,DMChannel.jump_urlandThread.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 inConverter(#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 ofabc.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 therowattribute 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()usingStagePrivacyLevelinstead ofGuildScheduledEventPrivacyLevel(#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()documentationFix 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.0Due 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 aVoiceChannel, 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 returnSubCommandGrouporSubCommandinstances, see documentationdisnake.types.ThreadArchiveDurationis nowThreadArchiveDurationLiteral, to avoid confusion with the newThreadArchiveDurationenum
Deprecations¶
The
role_idsanduser_idsparameters forguild_permissionsare nowrolesandusersrespectively; 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 onabc.GuildChannel.create_invite()guild_scheduled_event_idparameter onClient.fetch_invite()Include
eventURL parameter inInvite.urlif applicableSupport parsing scheduled event ID from invite URLs
- Add guild timeouts (#161, #221, #223)
timeoutparameter onMember.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 aVoiceChannel, 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
nsfwandslowmode_delayvalues/parameters are currently not supported by the API and are still TBDPinned messages are currently not exposed in the client UI, and while the API for them works, their future is uncertain
VoiceChannelnow inherits fromabc.MessageableNew
VoiceChannelproperties:.nsfw,.slowmode_delay,.last_message_id,.last_messageNew
VoiceChannelmethods:.is_nsfw,.get_partial_messagensfwandslowmode_delayparameters forVoiceChannel.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_countandGuild.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 aPermissionsinstance (using aPermissionsannotation)Add
AppInfo.flags[ext.commands] Add
channel_typesparameter toParam/ParamInfo(#130)Add support for setting
slowmode_delayon thread creation (TextChannel.create_thread(),Message.create_thread()) (#132)Add
invitableparameter toTextChannel.create_thread()(#132)Add
fail_if_not_existsparameter toMessage.reply()(#199, #211)[ext.commands]
Bot.get_slash_commandnow works similar toBot.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,AppCommandInteractionAdd 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()andui.select()decorators (#163)Fix incorrect URL returned by
Template.urlFix sending local files in embeds with interactions/webhooks if only one embed was specified (#193)
Fix leftover uses of
json, which didn’t useorjsonif available (#184)Fix
Message.channeltype beingDMChannelfor ephemeral messages inon_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
colortocolour(#153)Add documentation for new guild feature values (#148)
- Add documentation for several methods/properties: (#153)
Fix incorrect type for
Invite.channelin documentationAdd 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 callbacksFix
Select.append_optionnot raising an error if 25 options have already been addedImprove check for
optionsparameter on slash commands and subcommandsImprove 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
versionaddedtagsAdd documentation for
InteractionBotandAutoShardedInteractionBot
v2.2.1¶
Bug Fixes¶
Fixed error related to guild member count
v2.2.0¶
New Features¶
Add kwarg
attachmentsto edit methodsAdd kwargs
fileandfilestoInteractionResponse.edit_message(),PartialMessage.edit()andMessage.edit()Add kwarg
filetoEmbed.set_image()andEmbed.set_thumbnail()Add kwarg
delaytoInteraction.delete_original_message()andWebhookMessage.delete()Add kwarg
delete_aftertoInteractionResponse.send_message()andWebhookMessage.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
UnresolvedGuildApplicationCommandPermissionsAdd kwargs
min_valueandmax_valueinOption[ext.commands] Add kwarg
min_value(with aliasesge,gt) toParam[ext.commands] Add kwarg
max_value(with aliasesle,lt) toParam[ext.commands] Add kwarg
ownertoguild_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
PartialGuildApplicationCommandPermissionsAdd
ApplicationCommandInteraction.filled_optionsproperty[ext.commands] Add
InteractionBot[ext.commands] Add
guild_permissions[ext.commands] Add kwargs
sync_commands_on_cog_unloadandsync_permissionstoInteractionBotBase
Bug Fixes¶
Music
default_permissionkwarg in user / message commandsCommands 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 asApplicationCommandInteractionandMessageInteraction.Add interaction data wrappers:
ApplicationCommandInteractionDataandMessageInteractionData.Add interaction data option wrapper:
ApplicationCommandInteractionDataOptionAdd
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 invokable 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 aliasparam) in caseParamInfocauses 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.