v2.7.0
onerandomusername
released this
01 Nov 19:45
·
259 commits
to master
since this release
What's Changed
This release adds support for python 3.11 and the new selects released by Discord.
See the docs for how to use these new selects.
Breaking Changes
- Properly document that
Message.system_content
may return None. While this is documented as a breaking change, this function always could return None if the message type was not recognised. (#766) - Rename InteractionDataResolved.get() to get_by_id(). (#814)
Deprecations
- Rename ApplicationCommandInteractionDataResolved to
InteractionDataResolved
. (#814) - [ext.commands] Deprecate the sync_commands, sync_commands_debug, and sync_commands_on_cog_unload parameters of Bot and
InteractionBot
. These have been replaced with the command_sync_flags parameter which takes aCommandSyncFlags
instance. (#806)
New Features
- Update
Message.system_content
to be accurate to the client as of October 2022. (#766)- This also properly documents that it is possible to return None.
- 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()
,.end
and.cancel
shortcuts. (#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
ComponentType
values.- Add
UserSelectMenu
,RoleSelectMenu
,MentionableSelectMenu
,ChannelSelectMenu
components. - Add
ui.UserSelect
,ui.RoleSelect
,ui.MentionableSelect
,ui.ChannelSelect
UI 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()
- SelectMenu ->
- Add
MessageInteraction.resolved_values
andMessageInteractionData.resolved
.
- Add
- Support delete_after parameter when sending ephemeral interaction responses. (#816)
- Allow slowmode_delay parameter of
ForumChannel.create_thread()
to be optional. (#822) - Add suppress_embeds parameter to
Interaction.edit_original_response()
andInteractionMessage.edit()
. (#832) - [ext.commands] Add
CommandSyncFlags
to provide sync configuration to Bot andInteractionBot
(and their autosharded variants) as command_sync_flags. (#265, #433, #468, #806)
Bug Fixes
- Add the missing attributes for
PermissionOverwrite
: use_application_commands and 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_days parameter 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
AutoModKeywordPresets
values. (#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.File
object as file kwarg makes adisnake.Embed
not 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
- Increase the upper bound for the aiohttp dependency from <3.9 to <4. (#789)
- Use importlib.metadata instead of the deprecated pkg_resources in the cli for displaying the version. (#791)
- [ext.commands] Add missing py.typed marker. (#784)
- [ext.tasks] Add missing py.typed marker. (#784)
Full changelog: https://docs.disnake.dev/en/stable/whats_new.html#v2-7-0
Git history: v2.6.0...v2.7.0