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.
- This also properly documents that it is possible to return
- 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 ) - Support Python 3.11. ( #785 , #827 , #829 , #833 )
- 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.
- Add new
- 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 )
- Update sphinx from version 5.1 to 5.3. ( #764 , #821 )
- 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 )