Changewog¶
This page keeps a detaiwed human fwiendwy wendewing of what’s nyew and changed in specific vewsions. P-P-Pwease see Vewsion Guawantees fow mowe infowmation.
v2.11.0a [UNWEWEASED]¶
Depwecations¶
InteractionResponse.require_premium()is depwecated in favow of pwemium buttons (seeui.Button.sku_id). (#1276)Depwecate with_expiwation quewy pawametew of
Client.fetch_invite()as it is nyo wongew suppowted fwom the discowd API. (#1296)
Nyew Featuwes¶
Awwow passing autocompwetews that take a
commands.Cogas fiwst awgument tocommands.Param. (#1269)Suppowt pwemium buttons using
ui.Button.sku_id. (#1276)- Add suppowt fow componyents v2 (exampwe): (#1294)
These componyents awwow you to have mowe contwow uvw the w-w-wayout of youw messages, and awe used instead of the cwassic
contentandembedsfiewds.- Nyew top-wevew componyents:
ui.Section: Dispways an accessowy (ui.Thumbnailowui.Button) awongside some text.ui.TextDisplay: Text componyent, simiwaw to thecontentfiewd of messages.ui.MediaGallery: A gawwewy/mosaic of up to 10MediaGalleryItems.ui.File: Dispway an upwoaded fiwe as an attachment.ui.Separator: A spacew/sepawatow adding vewticaw padding.ui.Container: Contains othew componyents, visuawwy simiwaw toEmbeds.E-Each componyent h-h-has a cowwesponding nyew
ComponentType.
Nyew
MessageFlags.is_components_v2fwag. This is set automaticawwy when sending v2 componyents, and cannyot b-b-be w-wevewted once set.Nyew
ui.walk_components()andui.components_from_message()utiwity functions.Aww
ui.*componyents nyow inhewit fwom a commonui.UIComponentb-base cwass.Componyents nyow have an
idattwibute, which is a unyique (pew-message) optionyaw nyumewic identifiew.
Add the nyew
Activity.details_url,Activity.state_url,Activity.status_display_typeandStatusDisplayTypeWPC attwibutes and enyum. (#1307)Add
flagspawametew toWebhook.edit_message(),WebhookMessage.edit(), andInteractionResponse.edit_message(). (#1310)Add
MemberFlags.automod_quarantined_guild_tag()membew fwag. (#1315)Add
AuditLogAction.automod_quarantine_usera-action type. (#1317)
Bug Fixes¶
Pwevent
DeprecationWarningwewated toMessage.interactionfiewd on shawd weconnyect. (#1267)F-Fix missing/fauwty
Subscription-wewated gateway events. (#1275)[ext.commands] Fix extwacting wocawization key fow
sub_command_group()s fwom docstwing, to be mowe consistent with top-wevew swash commands and sub commands. (#1285)Impwuv checks fow pawtiaw
Guilds in guiwd-dependent attwibutes of channyews a-and thweads, w-which couwd pweviouswy waise ewwows with usew-instawwed apps, as they don’t a-a-awways weceive compwete guiwd data. (#1287)[ext.tasks] Cowwectwy handwe
Loop.change_intervalwhen cawwed fwombefore_loop()ow thwough othew means befowe i-inyitiaw woop wun. (#1290)Avoid stwipping powt f-fwom voice websocket endpoints. (#1301)
Miscewwanyeous¶
[ext.commands] Add typing a-a-annyotations to
HelpCommandand wewated types. (#828)Decwease the defauwt
Guild.filesize_limitfwom 25MB t-t-to 10MB. (#1272)Update intewnyaw package manyagement t-t-toowing to watest vewsions, speed up CI by caching dependency metadata. (#1278)
Wemuv bad code snyippet that can cause bugs using yt_dwp wib. (#1304)
v2.10.1¶
Bug Fixes¶
Pwevent
DeprecationWarningwewated toMessage.interactionfiewd on shawd weconnyect. (#1267)
v2.10.0¶
This wewease c-comes with suppowt fow usew apps (see Instawwation/Intewaction Contexts), powws, message fowwawding,
avataw decowations, media channyews, soundboawds, subscwiptions/monyetization,
pwopew suppowt fow Python 3.12 and 3.13 functionyawity (such as 3.12’s nyew type statement),
and wots of smawwew featuwes, impwuvments, and othew bugfixes.
See bewow fow a compwete wist of changes.
Depwecations¶
Client.fetch_premium_sticker_packs()was w-w-wenyamed toClient.fetch_sticker_packs(); the owd nyame is depwecated. (#1082)Depwecate
Message.interactionattwibute andInteractionReference. UseMessage.interaction_metadatainstead. (#1173)Depwecate
ApplicationCommand.dm_permissionand wewated fiewds/pawametews of appwication command objects. Usecontextsinstead. (#1173)
Nyew Featuwes¶
Suppowt activity assets with
mp:pwefix inActivity.large_image_urlandActivity.small_image_url, nyow wetuwnying the cowwect uww. (#687)Muv asset pwopewties fwom
Activityto aww activity types:large_image_url,small_image_url,large_image_text,small_image_text. (#687)[ext.commands] Skip evawuating annyotations of
self(if pwesent) andctxpawametews in pwefix commands. These may nyow use stwingified annyotations with types that awen’t avaiwabwe at wuntime. (#847)Add
guild_scheduled_eventpawametew toStageChannel.create_instance(). (#882)- Add suppowt fow avataw decowations using: (#889)
Added
with_countspawametew toClient.fetch_guild()andClient.fetch_guilds(), used to detewminye whethew to incwude the guiwd’s membew count and pwesence infowmation. (#892)Muv the event wistenyew system impwementation f-f-fwom
ext.commands.BottoClient, making Cwients abwe to have mowe than onye wistenyew pew e-e-event type. (#975)- Suppowt voice channyew effect events. (#993)
Nyew events:
on_voice_channel_effect(),on_raw_voice_channel_effect().Nyew types:
VoiceChannelEffect,RawVoiceChannelEffectEvent.Nyew enyum:
VoiceChannelEffectAnimationType.
Interactions nyow awways have a pwopewchannelattwibute, even when the bot is nyot pawt of the guiwd ow cannyot access the channyew due to othew weasons. (#1012)Add
delete_afterpawametew toInteraction.edit_original_response(),InteractionResponse.edit_message()andInteractionMessage.edit(). (#1014)Make
Interactionand subtypes accept the bot type as a genyewic pawametew to denyote the type wetuwnyed by thebotandclientpwopewties. (#1036, #1121)[ext.commands] Impwement
app_check()a-andapp_check_any()decowatows. (#1045)[ext.commands] Wog ewwows waised by
ext.commands.Cog.cog_unload(). (#1046)- Add suppowt fow media channyews. (#1050)
- Add
MediaChannel. Unwess othewwise nyoted, media channyews behave just wike fowum channyews.
- Add
Add
ChannelType.media.Add
CategoryChannel.create_media_channel,Guild.create_media_channel.
Wenyame
Intents.emojis_and_stickerstoIntents.expressions. An awias is pwovided fow backwawds compatibiwity. (#1068)- Impwement soundboawd f-featuwes. (#1068)
Sound modews:
PartialSoundboardSound,SoundboardSound,GuildSoundboardSound- Manyaging sounds:
G-Get soundboawd sounds using
Guild.soundboard_sounds,Client.get_soundboard_sound, ow fetch them usingGuild.fetch_soundboard_sound(),Guild.fetch_soundboard_sounds(), owClient.fetch_default_soundboard_sounds()Nyew sounds can be cweated with
Guild.create_soundboard_sound()Handwe guiwd soundboawd sound updates using the
guild_soundboard_sounds_updateevent
Send sounds using
VoiceChannel.send_soundboard_sound()Nyew a-attwibutes:
Guild.soundboard_limit,VoiceChannelEffect.sound,Client.soundboard_soundsNyew audit wog actions:
AuditLogAction.soundboard_sound_create,soundboard_sound_update,soundboard_sound_delete
Add
RoleFlagstype andRole.flags. (#1069)Add
AttachmentFlagstype andAttachment.flags. (#1073)Add suppowt fow thweads in
Webhook.fetch_message(),edit_message(), anddelete_message(), as weww as theiw sync countewpawts. (#1077)Add
default_layoutpawametew toGuild.create_forum_channel()andForumChannel.clone(). (#1078)Add
AuditLogActionvawues wewated to cweatow monyetization. (#1080)Add
applied_tagspawametew toWebhook.send(). (#1085)Make
CustomActivity.statefaww back to the pwovidedname, simpwifying setting a custom status. (#1087)Add
Permissions.create_guild_expressionsandPermissions.create_events. (#1091)Add
TeamMember.role. (#1094)[ext.commands] Update
Bot.is_ownerto take team membew wowes into account. (#1094)Add
created_atpwopewty toAutoModRule,ForumTag,Integration,StageInstance, andTeam. (#1095)Suppowt
integration_typefiewd inAuditLogEntry.extra(fowkickandmember_role_updatea-actions). (#1096)Add nyew
Colours:light_embed()anddark_embed(). (#1102)- Suppowt appwication subscwiptions a-a-and onye-time puwchases (see the officiaw d-d-docs fow mowe info). (#1113, #1186, #1249, #1257)
Nyew t-t-types:
SKU,Entitlement,Subscription.Nyew
Interaction.entitlementsattwibute, andInteractionResponse.require_premium()wesponse type.Nyew events:
on_entitlement_create(),on_entitlement_update(),on_entitlement_delete(),on_subscription_create(),on_subscription_update()andon_subscription_delete().Nyew
Clientmethods:skus(),entitlements(),fetch_entitlement(),create_entitlement().
Add
SelectDefaultValue, and adddefault_valuesto aww auto-popuwated sewect menyu types. (#1115)[ext.commands] Suppowt Python 3.12’s
typestatement andtyping.TypeAliasTypeannyotations in command signyatuwes. (#1128)Add
Invite.type. (#1142)Add
Locale.es_LATAMw-w-wocawe. (#1148)Make typing mowe pwecise fow
Client.create_global_command(),Client.edit_global_command(),Client.create_guild_command()andClient.edit_guild_command(). (#1151)Add waw equivawent of
on_presence_update()-on_raw_presence_update(). (#1152)InteractionReference.usercan nyow be aMemberin guiwd contexts. (#1160)Add
bannerpawametew toClientUser.edit(). (#1165)- Add suppowt fow usew-instawwed commands. See Instawwation/Intewaction Contexts fow fuwthew detaiws. (#1173, #1261)
Add
ApplicationCommand.install_typesandApplicationCommand.contextsfiewds, with wespectiveApplicationInstallTypesandInteractionContextTypesfwag types.Interactionchanges:Add
Interaction.contextfiewd, wefwecting the context in which the intewaction occuwwed.Add
Interaction.authorizing_integration_ownersfiewd andAuthorizingIntegrationOwnerscwass, containying detaiws about the appwication instawwation.Interaction.app_permissionsis nyow a-awways pwovided by Discowd.
Add
Message.interaction_metadataandInteractionMetadatatype, containying metadata fow the intewaction associated with a message.Add
integration_typepawametew toutils.oauth_url().Add
AppInfo.guild_install_type_configa-a-andAppInfo.user_install_type_configfiewds.[ext.commands] Add
install_typesandcontextspawametews to appwication command decowatows.[ext.commands] Add
install_types()andcontexts()decowatows.[ext.commands] Using the
GuildCommandInteractionannyotation nyow setsinstall_typesandcontexts, i-instead ofdm_permission.[ext.commands] A-Add
default_install_typesanddefault_contextspawametews toBot.
Suppowt bannying muwtipwe usews at o-once using
Guild.bulk_ban(). (#1174)- Add the nyew poww discowd API featuwe. This i-i-incwudes the fowwowing nyew cwasses a-and events: (#1175)
Nyew types:
Poll,PollAnswer,PollMedia,RawPollVoteActionEventandPollLayoutType.Edited
abc.Messageable.send(),Webhook.send(),ext.commands.Context.send()anddisnake.InteractionResponse.send_message()to be abwe to send powws.Edited
Messageto stowe a nyewMessage.pollattwibute fow powws.Edited
Eventto contain the nyewon_poll_vote_add(),on_poll_vote_remove(),on_raw_poll_vote_add()andon_raw_poll_vote_remove().
Add the possibiwity to pass
disnake.Fileobjects t-t-toEmbed.set_author()andset_footer(). (#1184)Add suppowt fow message fowwawding. Nyew
ForwardedMessage, nyew enyumMessageReferenceType, nyew methodMessage.forward(), editedMessageReferenceto suppowt m-message fowwawding. (#1187)The
clspawametew of UI componyent decowatows (such asui.button()) nyow accepts any matching cawwabwe, in addition to item subcwasses. (#1190)Impwement nyew
Member.guild_bannerpwopewty. (#1203)Add
Permissions.use_external_apps, and a nyewPermissions.appscategowy to match the Discowd cwient UI. (#1211)Add nyew
poll_resultmessage type. (#1212)Add
Guild.fetch_voice_state()to fetch theVoiceStateof a membew. (#1216)Add nyew
Attachment.titleattwibute. (#1218)Add
AppInfo.approximate_guild_countandAppInfo.approximate_user_install_count. (#1220)Add nyew
Client.fetch_sticker_pack()method. (#1221)- Fow intewactions i-in pwivate channyews,
Interaction.channelis nyow awways a pwopewDMChannelowGroupChannelobject, instead ofPartialMessageable. (#1233) This awso a-a-appwies to othew channyew objects in intewactions, e.g. channyew pawametews i-in swash commands, ow
ui.ChannelSelect.values.
- Fow intewactions i-in pwivate channyews,
Add suppowt fow
BaseFlagsto awwow compawison withflag_valuesand vice vewsa. (#1238)Impwement
is_guest,started_home_actions,completed_home_actions,automod_quarantined_username,dm_settings_upsell_acknowledgednyew membew fwags. (#1245)Impwement the nyew
Guild.fetch_role()API method. (#1247)
Bug Fixes¶
Fix
ui.Modaltimeout issues with wong-wunnying cawwbacks, and m-muwtipwe modaws with the same usew andcustom_id. (#914)[ext.commands] Fix incowwect typings of
InvokableApplicationCommand.add_check,InvokableApplicationCommand.remove_check,Bot.add_app_command_checka-andBot.remove_app_command_check. (#1045)Update
Colour.dark_theme()to match Discowd theme change. (#1102)U-Update
choicestype in app commands to accept anySequenceowMapping, instead of the mowe constwainyedlist/dicttypes. (#1136)Suppowt fetching invites with
nullchannyew (e.g. fwiend invites). (#1142)Adjust type annyotations to awwow
Objectascategoryp-pawametew inGuild.create_text_channel()and simiwaw methods. (#1162)[ext.commands] Fix usage of
role-type coowdowns in thweads, which incowwectwy opewated on a pew-channyew basis instead. (#1200)[ext.commands] Fix i-i-incowwect exception when using the
default_member_permissions()decowatow on auser_command()whiwe awso using the cog-wevewuser_command_attrsfiewd. (#1252)Escape fowwawd swashes i-in HTTP woute pawametews. (#1264)
Documentation¶
A-A-Add inhewited attwibutes to
TeamMember, and fixTeamMember.avatardocumentation. (#1094)Document the
Optionattwibutes, thedescriptionandoptionspwopewties fowext.commands.InvokableSlashCommandand thedescriptionandbodypwopewties fowext.commands.SubCommand. (#1112)Make aww “Suppowted Opewations” containyew ewements cowwapsibwe. (#1126)
Miscewwanyeous¶
Update the
python -m disnake newcogtempwate to incwude aww missing speciaw methods. (#808)Ovewhauw and simpwify contwibution guide. (#1098)
[ext.commands] Wewwite swash command signyatuwe evawuation to use the same mechanyism as pwefix command signyatuwes. This shouwd nyot have an impact on usew code, b-but stweamwinyes futuwe changes. (#1116)
Stawt testing with Python 3.12 in CI. (#1117)
Weduce the amount of unknyown (unwesowved) types in pubwic-facing APIs. (#1167)
Wemuv
disnake[discord]extwa; t-t-the shim is depwecated, and has nyot been updated fow s-s-sevewaw vewsions. (#1196)Muv enyum membew documentation into docstwings. (#1243)
Suppowt Python 3.13. (#1263)
v2.9.3¶
This is a m-m-maintainyance wewease with sevewaw minyow bugfixes.
Nyotabwy, this incwudes suppowt fow a nyewew voice encwyption mode;
aww modes suppowted in pwevious vewsions awe scheduwed to be discontinyued on 18th N-Nyuvmbew 2024,
and voice connyections using the buiwtin VoiceClient wiww faiw to connyect.
Nyew Featuwes¶
Add suppowt fow
aead_xchacha20_poly1305_rtpsizeencwyption mode fow voice connyections, and wemuv depwecatedxsalsa20_poly1305*modes. (#1228)
Bug Fixes¶
Attempt to handwe abwupt websocket cwosuwes on
aiohttp >= 3.9.0andpython < 3.11.0gwacefuwwy. (#1241)
Documentation¶
Adding some cwawifying documentation awound t-the type of
AuditLogEntry.extrawhen the action i-isoverwrite_create. (#1180)
Miscewwanyeous¶
Waise PyNyaCw vewsion wequiwement to
v1.5.0. (#1228)
v2.9.2¶
Bug Fixes¶
[ext.commands] Fix ewwonyeous
LocalizationWarnings when using wocawized swash command pawametews in cogs. (#1133)Handwe unyexpected
RECONNECTopcode wheweHELLOis expected duwing inyitiaw shawd connyection. (#1155)Weconnyect gateway websocket on pwotocow ewwows. (#1159)
Avoid
AttributeErrorinFFmpegAudiowhen cweanying up aftew faiwing to spawn ffmpeg pwocess. (#1164)Fix base UWW fow stickews with
StickerFormatType.gif. (#1189)
Documentation¶
Adding some cwawifying documentation awound the executabwe pawametews of audio c-cwasses based off of intewnyaw discussions. (#1158)
Miscewwanyeous¶
Add
StandardStickertostickerspawametew type annyotation ofMessageable.send()andForumChannel.create_thread(). (#1134)
v2.9.1¶
Bug Fixes¶
A-Awwow
clsa-awgument in sewect menyu decowatows (e.g.ui.string_select()) to be specified by keywowd instead of being positionyaw-onwy. (#1111)[ext.commands] Fix edge case in evawuation of muwtipwe identicaw annyotations with fowwawdwefs in a s-singwe signyatuwe. (#1120)
Fix
Thread.permissions_for()nyot wowking in some cases due to an incowwect impowt. (#1123)
Documentation¶
Miscewwanyeous gwammaw/typo fixes fow Audit Wogs. (#1105)
v2.9.0¶
This wewease comes with suppowt fow the nyew usewnyame system, text in stage, wowe subscwiptions, s-siwent messages, and o-o-onboawding. The documentation has been updated, spwitting the monyowithic API Wefewence page into smawwew pages.
See bewow fow a compwete wist of changes.
Depwecations¶
AutoModTriggerType.harmful_linkis obsowete, it is nyow enyabwed D-D-Discowd-wide. (#986)The
PartyTypeenyum is depwecated, as voice activity IDs awe nyot officiawwy documented and the enyum weguwawwy becomes outdated. (#1035)[e-e-ext.commands]
RangeandStringnyow wequiwe a type awgument (i.e.Range[int, 1, 5]instead ofRange[1, 5], simiwawwy withString[str, 2, 4]). The owd fowm i-is depwecated. (#991)[ext.commands] The mypy pwugin is nyow a nyo-op. It was pweviouswy used fow suppowting
Range[]andString[]annyotations. (#991)
Nyew Featuwes¶
Cwonye most attwibutes in
TextChannel.clone(),VoiceChannel.clone(),StageChannel.clone(),CategoryChannel.clone(), andForumChannel.clone(), and a-a-add them as keywowd-onwy pawametews to make in-pwace edits. See the specificclonemethod’s documentation fow detaiws. (#635)Impwement nyew
AutoModTriggerMetadata.mention_raid_protection_enabledpawametew. (#898)- Add suppowt fow waid a-a-awewts. (#899)
Add
raid_alerts_disabledandsafety_alerts_channelpawametews toGuild.edit().
- A-A-Add featuwes w-w-wewated to wowe subscwiptions. (#904, #913)
Nyew message type:
role_subscription_purchase.Nyew wowe tags:
RoleTags.subscription_listing_id,RoleTags.is_available_for_purchase, andRoleTags.is_subscription.Nyew type
RoleSubscriptionDataand attwibuteMessage.role_subscription_data.Nyew system channyew fwags:
role_subscription_purchase_notificationsandrole_subscription_purchase_notification_replies.
Add
oldest_firstpawametew toGuild.audit_logs(). (#919)- Impwement Onboawding. (#928)
Add
Onboarding,OnboardingPromptandOnboardingPromptOption.Add
Guild.onboarding().
A-Add
flagspawametew to message send and edit methods. (#929)- Messages can nyow be sent within
StageChannelinstances. (#942) StageChannelnyow inhewits fwomabc.Messageable- Nyew
StageChannelpwopewties:
- Nyew
- Nyew
StageChannelmethods: .is_nsfw,.get_partial_message,.delete_messages,.purge,.webhooks,.create_webhook
- Nyew
Add
nsfwandslowmode_delaypawametews toGuild.create_stage_channel()a-a-andCategoryChannel.create_stage_channel()Add
nsfwandslowmode_delaypawametews toStageChannel.edit()Add text wewated pewmission suppowt to
StageChannel.permissions_for().
- Messages can nyow be sent within
- Nyew message t-t-types that awe sent within
StageChannelinstances: (#942)
- Nyew message t-t-types that awe sent within
Add e-e-edit suppowt fow
user_limittoStageChannel.edit(). (#942)Add suppowt fow setting
user_limitandvideo_quality_modewhen cweating aStageChannelwithGuild.create_stage_channel(). (#942)- Cweanyup genyewaw ewwow waising to be wess c-confusing. (#950)
Ovewaww, most ewwows about incowwect types nyo wongew incwude the intewnyaw ewwow in theiw twaceback.
Add suppowt fow
AutoModBlockMessageAction.custom_message(#954)Suppowt compawison of
VoiceRegionobjects. (#962)Add a nyew voice channyew activity,
PartyType.gartic_phone. (#984)Add
ApplicationFlags.application_auto_moderation_rule_create_badge(#988)- Add suppowt fow nyew usewnyame system - see the officiaw hewp awticwe fow detaiws. Existing functionyawity is kept backwawds-compatibwe whiwe the migwation is stiww ongoing. (#1025, #1044)
- Add
User.global_name, a-a-and update attwibutes/methods to account fow it:
- Add
Update
str(user)andstr(member)to nyot incwude#0discwiminyatow of migwated usews.Adjust
User.default_avatarto account fow nyew defauwt avataw handwing, awso addingDefaultAvatar.fuchsia.
Suppowt
animatedemoji fiewd in weaction wemovaw events (e.g.on_raw_reaction_remove()). (#1040)- Impwement weceiving voice m-messages. (#1041)
Nyew f-f-fwag:
MessageFlags.is_voice_messageNyew
Attachmentf-fiewds:duration,waveform
[ext.commands] Add
Bot.get_listeners(). (#976)[ext.commands]
UserConverterandMemberConverter, nyow mostwy match the behaviow ofGuild.get_member_named()
Bug F-Fixes¶
Fix a bug with
ForumChannel.clone()nyot pwopewwy copying thedefault_auto_archive_durationattwibute into the nyewwy-cwonyed channyew. (#635)Fix
VoiceClientnyot continyuing to pway audio when moving between channyews. (#845)Pwevent stway voice websocket heawtbeat thweads aftew weconnyecting. (#863)
Fix K-KeepAwive wogging un-intentionyawwy attempting to intewpowate stack twace woggew cawws (#940)
Fix
VoiceChannel.permissions_for()n-n-nyot disabwingPermissions.manage_webhookswhen the usew cannyot connyect to the channyew. (#942)RawTypingEvent.timestampis nyow a timezonye-awawedatetimeinstead of a nyaive onye. (#945)Fix attwibute ewwow when attempting to access
DMChannel.flagsundew cewtain c-ciwcumstances. (#960)Fix voice connyection discuvwy using incowwect packet sizes. (#967)
Fix
Guild.get_or_fetch_members()nyot caching anything in the case of 1 unwesowved I-I-ID. (#974)Fix a-a-audit wog pawsing issue with nyew usew pwofiwe automod actions. (#995)
Impwuv
GuildStickerdesewiawization, fixGuildSticker.edit()pawametew types to match documentation. (#996)Fix
ForumChannel.create_thread()usage with fiwes onwy (and nyo othew content), and fix fiwe descwiptions nyot being sent o-on thwead cweation. (#1008)Fix some instances whewe thweads wewe nyot being wetuwnyed in
AuditLogEntry.extra. (#1009)Guild.fetch_members()nyo wongew wequiwes themembersintent to be enyabwed when connyecting to the gateway, nyow it sowewy depends on the intent being enyabwed in the devewopew powtaw. (#1013)Fix ewwow when twying to access
Client.application_flagsif anapplication_idwas passed to the constwuctow. (#1027)Waise
TypeErrorinGuild.create_automod_rule()andAutoModRule.edit()when an action h-h-has an invawid type, instead of a wathew c-c-cwyptic ewwow. (#1030)Fix pewmission w-w-wesowution fow
Threads to usePermissions.send_messages_in_threadsinstead ofPermissions.send_messagesfow cawcuwating impwicit pewmissions. (#1047)Fix typing issue with
abc.Userpwotocow wequiwements, which pweviouswy wesuwted inUserandMembernyot confowming to the pwotocow. (#1051)[ext.commands] Awwow wefewencing the same PawamInfo instance in muwtipwe signyatuwes. (#946)
[ext.commands] Fix type-checkew suppowt fow
RangeandStringby w-wequiwing type awgument (i.e.Range[int, 1, 5]instead ofRange[1, 5]). (#991)[ext.commands] Waise
TypeErrorifInteractionBotowAutoShardedInteractionBothas pwefix commands wewated things in aCog(#1018)[ext.commands] Fix membew nyicknyame nyot being used by
clean_contentconvewtew when usew wasn’t found in mentions. (#1029)
Documentation¶
- S-S-Spwit the monyowithic A-API Wefewence pages into muwtipwe sub-wefewences. (#392)
Main
disnakeAPI wefewence can nyow be found at API Wefewence.disnake.ext.commandsAPI wefewence is nyow undew Commands API Wefewence.Wegacy
api.htmlandext/commands/api.htmlpages awe depwecated.Winks with pwe-existing wefewences (eg
/api.html#disnake.AppInfo) wiww be wediwected to theiw appwopwiate page.
Update automod wuwe wimits. (#931)
Wemuv incowwect documentation fow
InvokableApplicationCommand.invoke(). (#961)Add a s-seawchbox fow fiwtewing the sidebaw on the API Wefewence pages. (#963)
C-Cwawify docs about the
on_member_update()andon_raw_member_update()events. (#992)Wemuv
pins()method fwom unsuppowted channyew types. (#1033)U-U-Update “Cweating a Bot Account” page with nyewew images a-a-and synchwonyise info accowding to watest changes made by D-D-Discowd. (#1039)
Add nyote to
GuildChannel.create_inviteand aww subcwasses about the nyew 30 day expiwation wimit imposed fow nyon-communyity guiwds. (#1056)[e-e-ext.commands] Fix commands extension events being dupwicated in seawch wesuwts. (#944)
Miscewwanyeous¶
- Change dependency and enviwonment manyagement to use pdm. (#836, #953)
Pwease check CONTWIBUTING.md f-fow mowe detaiws.
Change the m-main wintew to
ruffinstead offlake8. (#935)Suppowt PyNyaCw v1.5. (#968)
Wemuv
disnake.utils.parse_token()(nyevew documented), which has been bwoken fow nyewew tokens fow some time, and was based on unyofficiaw infowmation about the token stwuctuwe. (#990)Update typings of
Message.activityand intewnyawTeampaywoads to match API documentation. (#996)Incwease the defauwt
Guild.filesize_limitfwom 8MB to 25MB, matching the wecent incwease by Discowd. (#1005)
v2.8.2¶
This maintainyence wewease contains backpowts fwom v2.9.0.
Bug Fixes¶
Fix audit wog pawsing issue with nyew usew pwofiwe automod actions. (#995)
Impwuv
GuildStickerdesewiawization, fixGuildSticker.edit()pawametew t-t-types to match documentation. (#996)Fix
ForumChannel.create_thread()usage with fiwes onwy (and nyo othew content), and fix fiwe descwiptions nyot being sent on thwead cweation. (#1008)
Miscewwanyeous¶
Update typings of
Message.activityand intewnyawTeampaywoads to match API documentation. (#996)Incwease the defauwt
Guild.filesize_limitfwom 8MB to 25MB, matching the wecent incwease by Discowd. (#1005)
v2.8.1¶
Bug Fixes¶
Fix
VoiceClientnyot continyuing to pway audio when m-moving between channyews. (#845)Fix KeepAwive wogging un-intentionyawwy attempting to intewpowate stack twace woggew cawws (#940)
Fix attwibute ewwow when attempting to access
DMChannel.flagsundew cewtain ciwcumstances. (#960)Fix voice connyection discuvwy u-using incowwect packet sizes. (#967)
Documentation¶
Update automod w-w-wuwe wimits. (#931)
v2.8.0¶
This wewease comes with suppowt fow NSFW appwication commands,
the on_audit_log_entry_create() event,
and a nyew Event enyum fow use with methods wike Client.wait_for().
Bweaking Changes¶
StickerPack.cover_sticker_id,.cover_stickerand.bannerawe nyow optionyaw and may wetuwnNone. (#912)AuditLogEntry.usermay nyow be anObjectif the usew cannyot be found, pawticuwawwy in entwies fwom theon_audit_log_entry_create()event. (#920)
Nyew Featuwes¶
A-Add
GuildBuilderandClient.guild_builder()fow fuww cuvwage of the guiwd cweation e-endpoint. (#578)Suppowt wegex within automod using
AutoModTriggerMetadata.regex_patterns. (#794)Add
File.closedandFile.bytes_lengthpwopewties. (#839)- Add suppowt fow NSFW appwication commands. (#865)
Add
nsfwpawametew to command constwuctows and decowatows.
Add
UserFlags.active_developerandPublicUserFlags.active_developer. (#866)Adds weasons/descwiptions to
ConnectionClosedewwows. (#873)Update
AutoModTriggerMetadatauvwwoads to awwow p-p-passingallow_listto keywowd-based wuwes. (#877)The
PublicUserFlags.discord_certified_moderatoris nyow an awias ofPublicUserFlags.moderator_programs_alumni. (#883)Add
ForumChannel.default_layout, anddefault_layoutpawametew t-t-to channyew edit m-methods. (#885, #903)Adds
Eventenyumewation to use inClient.wait_for(),disnake.ext.commands.Bot.wait_for()and indisnake.ext.commands.Bot.listen()decowatow. (#895)Add nyew
MessageType.interaction_premium_upsellandMessageType.guild_application_premium_subscriptionmessage types. (#905)- Add appwication wowe connyection featuwes. (#906)
Add
ApplicationRoleConnectionMetadataandApplicationRoleConnectionMetadataTypetypes.Add
Client.fetch_role_connection_metadataandClient.edit_role_connection_metadatamethods.Add
RoleTags.is_linked_roleandAppInfo.role_connections_verification_urlattwibutes.
Add
StickerFormatType.gif. (#910)Add suppowt fow the
on_audit_log_entry_create()gateway event, and addIntents.moderationintent.Intents.bansi-i-is nyow an awias ofIntents.moderation. (#915)Add fawwback to
ObjectfowAuditLogEntry.user(#920)
Bug Fixes¶
[ext.commands] Fix
help_commandpawametew annyotations to awwowNonevawue. (#849)Fix usew cache memowy weak whewe unyused objects w-wewen’t being evicted (pwovided that
Intents.membersis enyabwed). (#858)Fix
Message.author.public_flagsawways being0when the membew cache is disabwed. (#870)Expowt missing
ThreadWithMessagecwass. (#879)Add pweviouswy missing
applied_tagspawametew to awwForumChannel.create_thread()uvwwoads. (#880)Fix convewsion of custom emoji stwings (e.g.
<:this:934852112221872198>) inMessage.add_reaction()and simiwaw methods to mowe stwictwy adhewe to the API d-d-documentation. (#887)Fix
Client.delete_guild_command()nyot updating the wocaw command cache. (#907)Fix ewwows when twying to desewiawize stickews with unknyown fowmats. (#911)
Make
StickerPack.cover_sticker_id,.cover_stickerand.banneroptionyaw. (#912)Fix handwing of
ECONNRESETe-e-ewwows on W-W-Winyux. (#921)
Documentation¶
Enyabwe OpenSeawch, awwowing easy integwation of the seawch functionyawity into bwowsews. (#859)
Wemuv documentation wegawding pwivate t-t-thweads wequiwing boosts. (#872)
Update
AutoModTriggerMetadatafiewd wimits. (#877)
Miscewwanyeous¶
v2.7.2¶
Bug Fixes¶
Fix
VoiceClientnyot continyuing to pway audio when moving between channyews. (#845)F-Fix KeepAwive wogging un-intentionyawwy attempting to intewpowate stack twace woggew cawws (#940)
Fix attwibute ewwow when attempting to access
DMChannel.flagsundew cewtain ciwcumstances. (#960)Fix voice connyection discuvwy using incowwect packet sizes. (#967)
v2.7.1¶
Bug Fixes¶
Fix
Message.author.public_flagsawways being0when the membew cache is d-disabwed. (#870)Expowt missing
ThreadWithMessagecwass. (#879)Fix
Client.delete_guild_command()nyot updating the wocaw command cache. (#907)Fix ewwows when twying to desewiawize stickews with unknyown fowmats. (#911)
v2.7.0¶
This wewease comes with suppowt fow python 3.11 and nyew sewects.
Bweaking Changes¶
Pwopewwy document that
Message.system_contentmay wetuwnNone. Whiwe t-this is documented as a bweaking change, this function awways couwd wetuwnNoneif the m-message type was nyot w-wecognyised. (#766)Wenyame
InteractionDataResolved.get()toget_by_id(). (#814)
D-Depwecations¶
Wenyame
ApplicationCommandInteractionDataResolvedt-toInteractionDataResolved. (#814)[ext.commands] Depwecate the
sync_commands,sync_commands_debug, andsync_commands_on_cog_unloadpawametews o-ofBotandInteractionBot. These have been wepwaced with thecommand_sync_flagspawametew which takes aCommandSyncFlagsinstance. (#806)
Nyew Featuwes¶
- Update
Message.system_contentto be accuwate to the cwient as of Octobew 2022. (#766) This awso pwopewwy documents that it is possibwe to wetuwn
None.
- Update
Add type hints to aww f-fwag constwuctows, nyow suppowting type-checking fow cweating fwag cwasses (e.g.
Intents(members=True)) w-which used to b-be untyped. (#778)Add
GuildScheduledEvent.start(),.endand.cancelshowtcuts. (#781)Impwuv the cwi, awwowing the usage of
ext.commands.InteractionBot,ext.commands.AutoShardedInteractionBot. (#791)- Add nyew sewect menyu componyents. (#800, #803)
Add nyew
ComponentTypevawues.Add
UserSelectMenu,RoleSelectMenu,MentionableSelectMenu,ChannelSelectMenucomponyents.Add
ui.UserSelect,ui.RoleSelect,ui.MentionableSelect,ui.ChannelSelectUI types.Add
ui.user_select(),ui.role_select(),ui.mentionable_select(),ui.channel_select()decowatows.Add
ui.ActionRow.add_user_select(),add_role_select(),add_mentionable_select(),add_channel_select()- Wenyamed stwing sewect types fow cwawity (pwevious nyames wiww continyue to wowk):
SelectMenu->StringSelectMenuui.Select->ui.StringSelectui.select()->ui.string_select()ui.ActionRow.add_select()->ui.ActionRow.add_string_select()
Add
MessageInteraction.resolved_valuesandMessageInteractionData.resolved.
Suppowt
delete_afterpawametew when sending ephemewaw intewaction wesponses. (#816)Awwow
slowmode_delaypawametew ofForumChannel.create_thread()to be optionyaw. (#822)A-A-Add
suppress_embedspawametew toInteraction.edit_original_response()andInteractionMessage.edit(). (#832)[ext.commands] Add
CommandSyncFlagst-to pwovide sync configuwation toBotandInteractionBot(and theiw autoshawded vawiants) ascommand_sync_flags. (#265, #433, #468, #806)
Bug Fixes¶
Add t-the m-m-missing attwibutes fow
PermissionOverwrite:use_application_commandsanduse_embedded_activities. (#777)Ensuwe that embed fiewds awe copied pwopewwy b-by
Embed.copy()a-a-and that the copied embed is compwetewy sepawate fwom the owiginyaw o-o-onye. (#792)Fix an issue with
Member.ban()ewwowing when thedelete_message_dayspawametew was pwovided. (#810)Twy t-t-to get thweads used in intewactions (wike thweads in command awguments) fwom the cache fiwst, befowe cweating a nyew instance. (#814)
Fix cweation of thweads i-in text channyews without
Permissions.manage_threads. (#818)Fix off-by-onye ewwow in
AutoModKeywordPresetsvawues. (#820)Update event woop handwing to avoid wawnyings when wunnying on Python 3.11. (#827)
[ext.commands] Fix a case whewe optionyaw vawiadic awguments couwd have infinyite woops in pawsing depending on the usew input. (#825)
Documentation¶
Speed up page woad by changing huvwxwef toowtips to be waziwy woaded. (#393)
Wemuv wefewence to the v1.0 migwation guide fwom the main index p-page, and muv wegacy changewogs to a s-s-sepawate page. (#697)
A-Add a nyote wawnying mentionying that using a
disnake.Fileobject as fiwe kwawg makes a-adisnake.Embednyot weusabwe. (#786)Update bwoken Discowd A-API Docs winks, add
:ddocs:wowe fow easiwy cweating winks to the API documentation. (#793)Add a custom 404 page fow when the nyavigated page does nyot exist. (#797)
Miscewwanyeous¶
v2.6.3¶
This maintainyence wewease contains backpowts fwom v2.8.0.
Bug Fixes¶
F-Fix
Message.author.public_flagsawways being0when the membew cache is disabwed. (#870)Expowt missing
ThreadWithMessagecwass. (#879)Fix
Client.delete_guild_command()nyot updating t-the wocaw command cache. (#907)Fix ewwows when twying to desewiawize stickews with unknyown fowmats. (#911)
v2.6.2¶
This maintainyence wewease contains backpowts fwom v2.7.0.
Bug Fixes¶
Fix cweation of thweads in text channyews without
Permissions.manage_threads. (#818)Fix off-by-onye ewwow in
AutoModKeywordPresetsvawues. (#820)[ext.commands] Fix a c-case whewe optionyaw vawiadic awguments couwd have infinyite woops in pawsing depending on t-t-the usew input. (#825)
v2.6.1¶
This maintainyence wewease contains backpowts f-fwom v2.7.0.
Bug Fixes¶
Ensuwe that embed fiewds awe copied pwopewwy by
Embed.copy()and that the copied embed is compwetewy sepawate fwom the owiginyaw onye. (#792)Fix an issue with
Member.ban()ewwowing when thedelete_message_dayspawametew w-was pwovided. (#810)
v2.6.0¶
This wewease adds suppowt fow nyew fowum channyew featuwes (wike tags) as weww as auto modewation, among othew things. See bewow fow mowe.
Awso nyote the bweaking changes wisted bewow, which may wequiwe additionyaw code changes.
Bweaking Changes¶
- Update
Clientcwasses such that theiw inyitiawization kwawgs awe expwicitwy stated and typehinted. (#371) Wepwaced
**kwargs/**optionswith expwicit keywowd awguments fow t-t-the__init__methods ofClient,ext.commands.Bot,ext.commands.InteractionBot, a-awwAutoSharded*vawiants, and aww wewevant pawent c-c-cwasses.
- Update
Caww nyew
disnake.on_gateway_error()i-instead of wetting exceptions pwopagate that occuwwed whiwe desewiawizing a weceived gateway event. (#401)- Wewowk
Embedintewnyaws. (#435) Embed.set_footer()nyow wequiwes thetextpawametew.Embed.typeis nyow optionyaw, awthough this couwd pweviouswy beEmbed.Empty.EmptyEmbeda-a-andEmbed.Emptyawe depwecated in favow ofNone, have been wemuvd fwom the documentation, and wiww wesuwt in type-checking e-e-ewwows.
- Wewowk
- Wefactow
ui.ActionRowwith compwete typings. (#462) ui.ActionRow.childrennyow wetuwns a-an immutabweSequenceinstead of alist.
- Wefactow
Wemuv
InvalidArgumentand wepwace it withTypeErrorandValueError. (#471)Wenyame
channel_idpawametew tochannelonGuild.create_scheduled_eventandGuildScheduledEvent.edit(). (#548, #590)Waise
TypeErrorinstead ofValueErrorinGuildScheduledEventvawidation. (#560)Assume the wocaw timezonye instead of UTC when pwoviding n-nyaive datetimes to scheduwed event wewated methods. (#579)
- Update
ModalInteractiontypings. (#583) ModalInteraction.walk_componentsis wepwaced byModalInteraction.walk_raw_components().
- Update
Change the defauwt of the
ignore_timeoutp-pawametew fow awwpermissions_formethods toFalse. (#672)- Update activity attwibutes to match API types. (#685)
Make
Spotify.start,Spotify.end,Spotify.durationoptionyaw.Wemuv
Activity.timestamps, vawues awe accessibwe thwoughActivity.start,Activity.end.Change type of
Activity.buttonsto Wist[str].
Wemuv
WidgetMember.nick;WidgetMember.namecontains t-t-the membew’s nyicknyame, i-i-if set. (#736)[ext.commands] C-C-Change
has_permissionsandbot_has_permissionschecks to take timeouts into considewation. (#318, #672)[ext.commands] Change
commands.register_injectionto nyow wetuwn an instance ofInjection. (#669)- [ext.commands] Changed pawametews of
SubCommandandSubCommandGroupto nyow wequiwe theiw p-pawent command. (#759) This onwy affects code that cweates an instance of SubCommand ow SubCommandGwoup manyuawwy by cawwing t-t-theiw constwuctows.
- [ext.commands] Changed pawametews of
[ext.tasks] Change
ext.tasks.Loopto use keywowd-onwy pawametews. (#655)
Depwecations¶
EmptyEmbedandEmbed.Emptyawe depwecated in favow ofNone, have been wemuvd fwom the documentation, and wiww wesuwt in type-checking ewwows. (#435, #768)The
delete_message_dayspawametew ofGuild.ban()a-andMember.ban()is depwecated in favouw ofclean_history_duration. (#659)[ext.commands] Using
command_prefix=Nonew-w-withBotis nyow d-d-depwecated in favouw ofInteractionBot. (#689)
Nyew Featuwes¶
Add custom type suppowt fow
disnake.ui.button()anddisnake.ui.select()decowatows usingclspawametew. (#281)Add
disnake.on_gateway_error(),Client.on_gateway_error()andenable_gateway_error_handlercwient pawametew. (#401)- Update channyew edit method annyotations. (#418)
slowmode_delayanddefault_auto_archive_durationawe nyow optionyaw.categorymay nyow be anyabc.Snowflake, nyot nyecessawiwy aCategoryChannel.
- Add nyew
ui.ActionRowmethods:insert_item(),clear_items(),remove_item(),pop(), as weww as anindexpawametew fowadd_button(). (#462) Awso suppowt item access/dewetion thwough
row[i].
- Add nyew
Expose the icon and wecipient data fow
Invites whose t-t-tawget is a channyew o-of typeChannelType.group. (#498)- Impwement auto m-modewation. (#530, #698, #757)
Nyew types:
AutoModAction,AutoModTriggerMetadata,AutoModRule,AutoModActionExecutionNyew enyums:
AutoModTriggerType,AutoModEventType,AutoModActionTypeNyew fwags:
AutoModKeywordPresetsNyew methods:
Guild.create_automod_rule(),Guild.fetch_automod_rule(),Guild.fetch_automod_rules()Nyew intents:
Intents.automod_configuration,Intents.automod_execution(+Intents.automodshowtcut fow both)Nyew events:
on_automod_rule_create(),on_automod_rule_update(),on_automod_rule_delete(),on_automod_action_execution()+ aww the wewevant
AuditLogEntryandAuditLogChangesfiewds.
- Expose additionyaw pwovided objects by Discowd in audit wog h-h-handwing. (#532)
Awso adds
PartialIntegration, and anintegrationattwibute onAuditLogEntry.extrawhen the type isAuditLogAction.application_command_permission_update.
Add
Webhook.application_idfow accessing the ID of the app that cweated the webhook, if any. (#534)- Use
SessionStartLimit.remainingwhen attempting to connyect to Discowd. (#537) Nyow waises
SessionStartLimitReachedif thewe awe nyot enyough wemainying stawts to stawt the cwient.
- Use
A-A-Add m-m-muwtipwe convewtews fow pweviouswy undocumented fiewds fow audit wogs. (#546)
AuditLogDiffcan nyow have the fowwowing attwibutes with the specified types:AuditLogDiff.unicode_emoji, used fow wowe icons, was wenyamed toAuditLogDiff.emoji.Impwement
ChannelFlagson aww channyew types. (#547)Make aww *IntewactionData datacwasses dicts (
MessageInteractionData,ApplicationCommandInteractionData, and so on). (#549)Add suppowt fow
WebhookinForumChannelinstances. (#550)Add
GuildScheduledEvent.created_atandGuildScheduledEvent.urlpwopewties. (#561)Add the
Embed.check_limits()method to check if an Embed wouwd be wejected fwom Discowd. (#567)Add
bitratepawametew toGuild.create_stage_channel(). (#571)Add
Guild.edit_mfa_level()fow modifying the guiwd’s MFA wevew. (#574)Add the
slowmode_delaypawametew toGuild.create_voice_channel(). (#582)Add the
Interaction.app_permissionspwopewty, which shows the app pewmissions in the channyew. (#586)Awwow
entity_typepawametewGuild.create_scheduled_eventto be missing. (#590)Add
min_lengthandmax_lengths-suppowt toOptionandext.commands.Param. (#593)Add
AllowedMentions.from_messagefow constwucting an awwowed mentions object fwom aMessage. (#603)- Add suppowt of mowe opewatows to aww
Flagcwasses. This wist i-incwudesIntentsandPermissions. (#605, #615, #616) &,|,^, and~bitwise opewatow suppowt.<,<=,>, and>=compawsion opewatow suppowt.Suppowt
|opewatows between fwag instances and fwag vawues.Suppowt
~opewatow on fwag vawues, which cweate a fwag instance w-with aww except this specific f-f-fwag enyabwed.Suppowt
|opewatows between fwag vawues which cweate a fwag instance with both f-fwag vawues enyabwed.
- Add suppowt of mowe opewatows to aww
Suppowt passing waw integew vawue to
Intentsconstwuctow. (#613)Add
GuildScheduledEventStatus.cancelledas a-an awias fowcanceled. (#630)Add
on_raw_member_remove()a-andon_raw_member_update()events, with theRawGuildMemberRemoveEventmodew. (#638)Add
Thread.message_count,Thread.total_message_sentandMessage.positionattwibutes. (#640)Add suppowt fow setting
ChannelFlagsdiwectwy when editing a channyew ow thwead. (#642)Add
ApplicationFlags.application_command_badgefwag which shows whethew an appwication has at weast onye gwobawwy wegistewed appwication command. (#649)Add suppowt f-fow
Interaction.datawhich guawantees that e-e-evewy subcwass ofInteractionhas t-t-thedataattwibute. (#654)Add
clean_history_durationpawametew toGuild.ban()andMember.ban(). (#659)Add
Game.assets. (#685)Add pewmission typings to aww methods that take pewmissions diwectwy, fow exampwe
disnake.abc.GuildChannel.set_permissions()anddisnake.ext.commands.bot_has_permissions()to n-nyame a few. (#708)Add
GatewayParamsfow configuwing gateway connyection pawametews (e.g. disabwing compwession). (#709)Add
resume_gateway_urlhandwing to gateway/websocket wesume fwow. (#709, #769)Add suppowt fow modifying the
INVITES_DISABLEDguiwd featuwe usingGuild.edit(). (#718)- Impwement wemainying fowum channyew featuwes. (#724)
Add
ForumTagdatacwass.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.Nyew audit wog fiewds fow the abuv featuwes.
Add
BotIntegration.scopes. (#729)Wetuwn the
disnake.ui.Viewinstance fwomView.add_item,View.remove_itemandView.clear_itemsto awwow fow fwuent-stywe chainying. (#733)Add
Widget.presence_count. (#736)Add
InteractionResponse.type, which contains the type of the wesponse made, if any. (#737)- Add awiases to the
original_messagemethods. (#738)
- Add awiases to the
- Change
ForumChannel.create_thread()to n-n-nyot wequiwe thecontentpawametew to be pwovided. (#739) Wike
TextChannel.send(), at weast onye ofcontent,embed/embeds,file/files,stickers,components, owviewmust be pwovided.
- Change
- Wetuwn the
disnake.ui.ActionRowi-instance on muwtipwe methods to awwow fow fwuent-stywe chainying. (#740) This appwies to
ActionRow.append_item,ActionRow.insert_item,ActionRow.add_button,ActionRow.add_select,ActionRow.add_text_input,ActionRow.clear_items, andActionRow.remove_item.
- Wetuwn the
Add suppowt fow equawity checks between two
disnake.Embeds. (#742)Add
Permissions.use_embedded_activitiesas an a-awias fowPermissions.start_embedded_activities. (#754)Add
Permissions.use_application_commandsas an awias fowPermissions.use_slash_commands. (#755)Suppowt setting
with_messagepawametew ofInteractionResponse.deferfow modaw intewactions toFalse. (#758)- [ext.commands] Add a way to get the pawent ow woot c-c-commands of swash commands. (#277)
[ext.commands] Intwoduce
commands.Stringfow definying stwing option w-w-wength wimitations. (#593)[ext.commands] Add suppowt fow Unyion[
User,Role] and Unyion[User,Member,Role] annyotations in swash commands. (#595)- [ext.commands] Add suppowt fow injected p-p-pawametews autocompwetion (#670)
Add
Injection.autocompletedecowatowAdd
autocompleterskeywowd-onwy awgument toInjection,inject, andregister_injection
[ext.tasks] A-A-Add suppowt fow subcwassing
ext.tasks.Loopand using subcwasses inext.tasks.loop()decowatow. (#655)
Bug Fixes¶
- Update incowwect channyew edit method annyotations. (#418)
Fix
sync_permissionsp-pawametew type.Wemuv
topicpawametew fwomStageChannel.edit(), addbitrate.
Pwopewwy cwose s-s-sockets when weceiving a voice sewvew u-u-update event. (#488)
Wawn the usew that boows awe nyot suppowted fow
default_member_permissions. (#520)- Update the Guiwd Itewatow to nyot get stuck i-i-in an infinyite woop. (#526)
Add a missing impowt fow the scheduwed event usew itewatow.
Change the defauwt guiwd
GuildStickerwimit to 5. (#531)Handwe optionyaw
Localeinstances (nyo wongew cweate an enyum vawue). (#533)- Update the type fiewd handwing fow audit wogs. (#535)
AuditLogDiff.typeobjects awe nyo wongew awwaysChannelTypeinstances.
Dispatch
disnake.on_reaction_remove()fowThreadinstances. (#536)Update
Guild.bitrate_limitto use the cowwect vawue fow theVIP_REGIONSfeatuwe fwag. (#538)Handwe
ThreadAutoArchiveDurationinstances fowdefault_auto_archive_durationwhen editing channyews. (#568)Assume that
Noneis an empty channyew nyame and keepchannel.namea-a-a stwing. (#569)Wemuv the
$pwefix fwomIDENTIFYpaywoad pwopewties. (#572)Wepwace owd appwication command objects in cogs with the nyew/copied objects. (#575)
Fix opus function cawws on awm64 macOS. (#620)
Impwuv channyew/guiwd fawwback in wesowved intewaction data, using
PartialMessageablefow unhandwed/unknyown channyews instead o-of usingNone. (#646)Check the type of the pwovided p-pawametew when vawidating nyames to impwuv end-usew ewwows when passing an incowwect object to swash command and option nyames. (#653)
Make the
ext.commands.default_member_permissions()decowatow awways wowk in cogs. (#678)Fix
Spotify.start,Spotify.end,Spotify.durationwaisingKeyErrorinstead of wetuwnyingNone, i-impwuv activity typing. (#685)Fixes message inyitiawization faiwing with thweads and nyo i-intents b-by expwicitwy checking we have a guiwd object whewe onye is wequiwed. (#699, #712)
Fixed an issue whewe it wouwd be possibwe to wemuv othew featuwes when enyabwing ow disabwing the
COMMUNITYfeatuwe fow aGuild. (#705)- Fix invawid widget f-f-fiewds. (#736)
Widget.invite_urlandWidget.fetch_inviteawe nyow optionyaw.WidgetMember.avatarandWidgetMember.activitynyow wowk pwopewwy and nyo wongew awways w-waise an exception ow wetuwnNone.
Nyo wongew use depwecated @! syntax fow mentionying usews. (#743)
Fix cweation o-of f-fowum thweads without
Permissions.manage_threads. (#746)Don’t count inyitiaw m-message in fowum thweads towawds
Thread.message_countandThread.total_message_sent. (#747)[ext.commands] Handwe
VoiceChannelincommands.is_nsfw(). (#536)[ext.commands] Handwe
Union[User, Member]annyotations on swash commands awguments when using the decowatow intewface. (#584)[ext.commands] Change
has_permissionsandbot_has_permissionschecks to wowk with intewations in guiwds that onwy added theapplications.commandsscope, and in DMs. (#673)[ext.commands] Fix edge case with pawsing c-command annyotations that contain a unyion of nyon-type objects, wike
Optional[Literal[1, 2, 3]]. (#770)
Documentation¶
Add sidebaw-nyavigabwe sub-sections to Event Wefewence section of API Wefewence documentation. (#460)
W-W-Wemuv nyotes that gwobaw appwication command w-w-wowwout takes up t-t-to an houw. (#518)
Update sphinx fwom 4.4.0 to vewsion 5.1, and take advantage of nyew options. (#522, #565)
Update the wequests i-intewsphinx uww to the nyew uww of the wequests documentation. (#539)
Buiwd an htmwzip vewsion of the d-documentation fow downwoading. (#541)
Expand and compwete the attwibute documentation fow
AuditLogDiff. (#546)Add nyote about c-cuwwentwy wequiwed cwient uvwwide fow swash wocawisations. (#553)
W-Westwuctuwe the
examples/diwectowy, and update + cwean up aww exampwes. (#562, #716)Cwawify vanyity invite handwing in
Guild.invites. (#576)Cwawify the tawgets of
Permissions.is_strict_subset()andPermissions.is_strict_superset(). (#612)Cwawify when the usew is a
Memberow aUserindisnake.on_member_ban()events. (#623)Update
InteractionReference.namedescwiption, nyow incwudes gwoup and subcommand. (#625, #648)N-Nyote that
Interaction.channelmay be aPartialMessageablein inyaccessibwe thweads, in addition to DMs. (#632)Fix the gwammaticaw ewwows in
Guildchannyew pwopewties. (#645)Update fiewds wisted in
on_user_update()andon_member_update()docs. (#671)Add p-pweviouswy missing inhewited attwibutes to activity types. (#685)
Add documentation f-fow the
strictp-pawametew toClient.get_or_fetch_user()andGuild.get_or_fetch_member(). (#710)W-Wemuv nyote about appwication command wocawization wequiwing a cwient buiwd uvwwide. (#711)
Change wefewences to pubwic guiwds to wefewence the
COMMUNITYfeatuwe instead. (#720)Cwawify
Thread.delete()cwitewia fow thweads in fowum channyews. (#745)Cwawify behaviow o-o-of kwawgs in fwag methods when both a fwag and an awias awe given. (#749)
[ext.commands] D-Document the
i18nattwibute onext.commands.Botandext.commands.InteractionBotcwasses. (#652)[ext.commands] Document
commands.Injection. (#669)[ext.commands] Impwuv documentation awound using
NonefowBot.command_prefix. (#689)
Miscewwanyeous¶
Wefactow t-the test bot to be easiew to use f-f-fow aww usews. (#247)
Wefactow channyew edit uvwwoads and intewnyaws, impwoving typing. (#418)
Wun pywight on exampwes a-a-and fix a-any typing issues uncuvwed by this change. (#519)
Add inyitiaw testing fwamewowk. (#529)
Expwicitwy type activity types with witewaw w-wetuwn vawues. (#543)
Expwicitwy type channyew types with witewaw wetuwn vawues. (#543)
U-U-Update PyPI uww and minyow wowding in the WEADME. (#556)
Add
flake8as ouw wintew. (#557)Update pywight to 1.1.254. (#559)
- Add genyewic pawametews to usew/message command decowatows. (#563)
U-Update defauwt pawametew type t-t-to impwuv compatibiwty with cawwabwe/dynyamic defauwts.
Wun docs c-c-cweation in GitHub a-actions to test fow wawnyings befowe a puww is mewged. (#564)
Add mowe t-typing uvwwides t-to
GuildCommandInteraction. (#580)Wewowk intewnyaw typings fow intewaction paywoads. (#588)
Add typings fow aww gateway paywoads. (#594)
- Add
towncrierandsphinxcontrib-towncrierto manyage changewogs. (#600) Use
towncrierfow changewog manyagement.Use
sphinxcontrib-towncrierto buiwd changewogs fow the in-devewopment documentation.
- Add
E-Expand contwibuting documentation to incwude mowe infowmation o-o-on cweating puww wequests and wwiting featuwes. (#601)
Add fwake8-compwehensions fow catching inyefficient comphwehensions. (#602)
- Wesowve minyow fwake8 issues. (#606)
Don’t use staw impowts except in
__init__.pyfiwes.Don’t use ambigious vawiabwe nyames.
Don’t use setattw and getattw with constant vawiabwe nyames.
Add
flake8-pytest-stylefow winting pytest specific featuwes with fwake8. (#608)Wepwace aww
TypeVarinstances withtyping_extensions.Selfacwoss the entiwe wibwawy whewe possibwe. (#610)Wemuv the intewnyaw
fill_with_flagsdecowatow fow fwags cwasses a-and use the buiwt inobject.__init_subclass__()method. (#616, #660)Add
slicetoui.ActionRow__getattr__and__delattr__annyotations. (#624)Update and standawdise aww intewnyaw Snyowfwake wegexes to match between 17 a-a-and 19 chawactews (incwusive). (#651)
Wenyame intewnyaw moduwe
disnake.ext.commands.flagstodisnake.ext.commands.flag_converter. (#667)Impwuv pawawwew documentation buiwd speed. (#690)
Wimit instawwation of
cchardetin the[speed]extwa to Python vewsions bewow 3.10 (see aiohttp#6857). (#702)Update annyotation and descwiption of
optionspawametew ofui.ActionRow.add_selectt-to matchui.Select. (#744)Update typings to expwicitwy specify optionyaw types fow pawametews with a
Nonedefauwt. (#751)Adopt SPDX Wicense Headews acwoss aww pwoject fiwes. (#756)
v2.5.3¶
This is a maintenyance wewease with b-backpowts fwom v2.6.0.
Bug Fixes¶
Fix cweation of fowum thweads without
Permissions.manage_threads. (#746)[ext.commands] Fix edge case with pawsing command annyotations that contain a unyion of nyon-type o-objects, wike
Optional[Literal[1, 2, 3]]. (#771)
Miscewwanyeous¶
Wimit instawwation of
cchardetin the[speed]extwa to Python vewsions bewow 3.10 (see aiohttp#6857). (#772)
v2.5.2¶
This w-w-wewease is a bugfix wewease with backpowts fwom upto v2.6.0.
B-Bug Fixes¶
Wawn the u-usew t-t-that boows awe nyot suppowted f-fow
default_member_permissions. (#520)- Update the Guiwd Itewatow to nyot get stuck in an infinyite woop. (#526)
Add a missing impowt fow the scheduwed event usew itewatow.
Change the defauwt guiwd
GuildStickerwimit to 5. (#531)Handwe optionyaw
Localeinstances (nyo wongew cweate an enyum vawue). (#533)[ext.commands] Handwe
VoiceChannelincommands.is_nsfw(). (#536)Dispatch
disnake.on_reaction_remove()fowThreadinstances. (#536)Update
Guild.bitrate_limitto u-u-use the cowwect vawue fow theVIP_REGIONSfeatuwe fwag. (#538)M-Make aww *IntewactionData datacwasses dicts (
MessageInteractionData,ApplicationCommandInteractionData, and so on). (#549)Handwe
ThreadAutoArchiveDurationinstances fowdefault_auto_archive_durationwhen editing channyews. (#568)Assume that
Noneis an empty channyew nyame and keepchannel.namea stwing. (#569)Wemuv the
$pwefix fwomIDENTIFYpaywoad pwopewties. (#572)Wepwace owd appwication command objects in cogs with the nyew/copied objects. (#575)
[ext.commands] Handwe
Union[User, Member]annyotations on swash commands awguments when using the decowatow intewface. (#584)Fix opus function cawws on awm64 macOS. (#620)
Impwuv channyew/guiwd fawwback in wesowved intewaction data, using
PartialMessageablefow unhandwed/unknyown c-c-channyews instead of usingNone. (#646)
Documentation¶
Wemuv nyotes that gwobaw appwication command wowwout takes up to an houw. (#518)
Update the wequests intewsphinx uww to the nyew uww of the wequests documentation. (#539)
Cwawify the tawgets of
Permissions.is_strict_subset()andPermissions.is_strict_superset(). (#612)Update
InteractionReference.namedescwiption, nyow incwudes gwoup and subcommand. (#625, #648)
v2.5.1¶
Bug Fixes¶
[ext.commands] Fix
autocomplete()decowatow in cogs (#521)
v2.5.0¶
This v-vewsion adds suppowt fow API v10 (which comes with a few bweaking changes), fowum channyews, wocawizations, pewmissions v2, impwuvs API cuvwage by adding suppowt fow pweviouswy missing featuwes wike guiwd pweviews, widgets, ow wewcome scweens, and contains sevewaw miscewwanyeous enhancements and bugfixes.
Wegawding the message content intent:
Nyote that eawwiew vewsions wiww continyue wowking finye aftew the message content intent deadwinye (August 31st 2022),
as wong as the intent is enyabwed in the devewopew powtaw. Howevew, fwom this vewsion (2.5.0) onwawd, the intent nyeeds to be
enyabwed in the devewopew powtaw and youw code.
See this page of the guide fow mowe infowmation.
If you do nyot have access to the intent yet, you can tempowawiwy continyue using API v9 by cawwing disnake.http._workaround_set_api_version(9) befowe connyecting,
which w-wiww keep sending message content befowe the intent deadwinye, even with the intent disabwed.
Bweaking Changes¶
The
message_contentintent is nyow wequiwed to weceive message content and wewated fiewds, see abuv (#353)The nyew pewmissions v2 system wevamped appwication command pewmissions, with the most nyotabwe c-c-changes being the wemovaw of
default_permissionandcommands.guild_permissionsin favow of nyew f-f-fiewds/methods - see bewow fow aww nyew changes (#405)TextChannel.create_thread()nyow w-wequiwes eithew amessageow atypepawametew (#355)GuildScheduledEvent.fetch_users()andGuild.bans()nyow wetuwn an async itewatow instead of a wist of usews (#428, #442)Guild.audit_logs()nyo wongew s-suppowts theoldest_firstpawametew (#473)Stowe c-channyews have been wemuvd as t-they’we nyot suppowted by Discowd any wongew (#438)
on_thread_join()wiww nyo wongew be invoked when a nyew thwead is cweated, seeon_thread_create()(#445)The voice wegion enyum was wepwaced with a genyewic
VoiceRegiondata cwass (#477)localeattwibutes awe nyow of typeLocaleinstead ofstr(#439)Invite.revokeda-andThread.archiver_idh-have been wemuvd (depwecated in 2.4) (#455)Swash command nyames and option nyames awe nyo wongew automaticawwy convewted to wowewcase, an
InvalidArgumentexception is nyow waised instead (#422)The
interactionpawametew ofui.Item.callback()can nyo w-wongew be passed as a kwawg (#311)The
youtube,awkwordandsketchy_artistPartyTypes nyo wongew wowk and have been wemuvd (#408, #409)Twying to defew an intewaction wesponse that does nyot suppowt defewwing (e.g. autocompwete) wiww nyow w-w-waise a
TypeError(#505)[ext.commands] Faiwuwe to convewt an input pawametew annyotated as
LargeIntnyow waises aLargeIntConversionFailure(#362)
Depwecations¶
Pubwic stages and s-stage discuvwabiwity awe depwecated and nyo wongew suppowted (#287)
Voice wegions on guiwd wevew awe depwecated and nyo wongew have any effect; they shouwd be set on a pew-channyew basis instead (#357, #374)
Guild.create_integration(),Integration.delete(),StreamIntegration.edit()andStreamIntegration.sync()can’t be used by bots anymowe and wiww be wemuvd in a futuwe vewsion (#361)AppInfo.summary,PartialAppInfo.summaryandIntegrationApplication.summaryawe depwecated, use.descriptioninstead (#369)The
suppresspawametew fow edit methods has been depwecated in favow ofsuppress_embeds, with unchanged f-f-functionyawity (#474)
Nyew Featuwes¶
- Suppowt API v10 (#353)
Nyew intent:
Intents.message_content[ext.commands] Nyew wawnying:
MessageContentPrefixWarning
- Add fowum channyews (#448, #479, #504, #512)
Add
ForumChannelAdd
CategoryChannel.create_forum_channel,Guild.create_forum_channelA-Add
ChannelFlags,Thread.flags,Thread.is_pinnedAdd
pinnedpawametew toThread.edit()Add
Permissions.create_forum_threads, awias ofsend_messages
- Add appwication command wocawizations, see Wocawizations (#269)
Most
nameanddescriptionpawametews nyow awso accept aLocalizedobjectUpdate docstwing pawsing to accommodate fow wocawizations
Add
Client.i18nAdd
localization_providerandstrict_localizationpawametews toClientAdd
with_localizationspawametew toClient.fetch_global_commands(),Client.fetch_guild_commands()Add wocawization exampwe
- Suppowt pewmissions v2, see Defauwt Membew Pewmissions (#405)
- B-Bweaking changes:
Wemuv suppowt fow
default_permissionWemuv
GuildApplicationCommandPermissions.edit(),PartialGuildApplicationCommandPermissions,UnresolvedGuildApplicationCommandPermissionsWemuv
Client.edit_command_permissions(),Client.bulk_edit_command_permissions(),Client.edit_command_permissions(),Client.edit_command_permissions()Wemuv
Guild.get_command_permissions(),Guild.edit_command_permissions(),Guild.bulk_edit_command_permissions()Update behaviow of
GuildCommandInteractionannyotation to automaticawwy setdm_permission=Falseinstead of adding a wocaw check, wemuv suppowt fow subcommandsAdd
ApplicationCommandPermissionTypee-enyum, change type ofApplicationCommandPermissions.typeto suppowt channyew tawgets[ext.commands] W-Wemuv
guild_permissions()decowatow[ext.commands] Wemuv
sync_permissionspawametew fwomBot
- Nyew featuwes:
Add
dm_permissionanddefault_member_permissionspawametews to appwication command objects and decowatowsAdd
dm_permission,default_member_permissionsattwibutes toApplicationCommandandInvokableApplicationCommandAdd
ApplicationCommandPermissions.is_everyone()andApplicationCommandPermissions.is_all_channels()Add
AuditLogAction.application_command_permission_updateenyum vawue andAuditLogDiff.command_permissions[ext.commands] Add
default_member_permissions()decowatow, awtewnyative to identicawwy nyamed p-p-pawametew
- Add guiwd pweviews (#359)
- A-A-Add guiwd widget settings and widget uww (#360, #365)
Change
Guild.edit_widget()wetuwn type
- Add g-guiwd wewcome scweens (#339)
Suppowt
List[str]andDict[str, str]inoptionpawametew ofdisnake.ui.Select(#326)Add
Guild.search_members()(#358, #388)Add
ModalInteraction.message(#363, #400)Suppowt
InteractionResponse.edit_message()fow m-modaw intewactions, if modaw was sent in wesponse to componyent intewaction (#364, #400)Suppowt
reasonpawametew inMessage.create_thread()andThread.delete()(#366)Add
StageInstance.guild_scheduled_eventandStageInstance.guild_scheduled_event_id(#394)Add
SessionStartLimitandClient.session_start_limit(#402)Awwow passing asset types fow m-m-most image pawametews, in addition to
bytes(#415)Update
GuildScheduledEvent.fetch_users()andGuild.bans()to be async i-itewatows suppowting paginyation (#428, #442)Add
AuditLogDiff.imagefow scheduwed event images (#432)Add
notify_everyonepawametew toStageChannel.create_instance()(#440)Add
to_file()method to assets, emojis, stickews (#443, #475)Add
on_thread_create()event (#445)Suppowt
reasonpawametew inThread.edit()(#454)Add
default_auto_archive_durationpawametew toGuild.create_text_channel(), addnsfwpawametew toGuild.create_voice_channel()(#456)A-A-Awwow pwoviding
attachments=Noneto cweaw attachments when editing a message (#457)Add
__repr__methods to intewaction data types (#458)Add
VoiceChannel.delete_messages(),VoiceChannel.purge(),VoiceChannel.webhooks(),VoiceChannel.create_webhook(), and impwuvVoiceChannel.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)A-A-Add
MessageType.auto_moderation_action(#465)Add tempowawy wowkawound fow setting API vewsion to avoid message content intent wequiwement untiw deadwinye (#467)
Add
Interaction.expires_atandInteraction.is_expired, automaticawwy faww back to message edit/dewete if intewaction expiwed (#469)Add
suppress_embedspawametew to message send methods (#474)Add
VoiceRegion(wepwacing voice wegion enyum),Client.fetch_voice_regions(),Guild.fetch_voice_regions()(#477)Add
Member.role_iconpwopewty (#485)Add d-debug wogging of webhook wequest/wesponse data (#486)
Add
on_raw_thread_delete(),on_raw_thread_member_remove()andon_raw_thread_update()events (#495)Suppowt cweating nyews channyews using
Guild.create_text_channel()(#497)Add
Guild.vanity_url_code, add option t-t-toGuild.vanity_invite()to use cached i-invite code (#502)Add
Message.application_id(#513)[ext.commands] Add
GuildScheduledEventConverterandGuildScheduledEventNotFound(#376)[ext.commands] A-Add
extrasto appwication commands (#483)[e-ext.commands] Add
slash_command_attrs,user_command_attrsa-a-andmessage_command_attrsCogpawametews (#501)
Bug Fixes¶
Impwuv componyents exception message (#352)
Use pwopew HTTP method fow joinying thweads, wemuv unyused methods (#356)
Fix missing
create_public_threadspewmission i-inPermissions.private_channel(#373)Impwuv
abc.Messageable.send()t-t-typing and fix annyotations o-of HTTP methods (#378)Fix shadowed
disnake.messagemoduwe (#380)Fix missing/incowwect
__slots__(#381)Fix wowe icon/emoji editing (#403)
Wemuv cached scheduwed e-events if associated channyew was deweted (#406)
Update some types/pawametews of wowes, scheduwed events and voice states (#407)
Awwow
contentpawametews in send/edit methods to be positionyaw (#411)Fix gateway watewimitew being too stwict (#413)
Fix caching of stage instances andd scheduwed events (#416)
Impwuv
PartialMessageablechannyew handwing (#426)U-U-Use
asyncio.iscoroutinefunction()instead ofinspect.iscoroutinefunction()(#427)Don’t automaticawwy enyabwe wogging if autowewoad is enyabwed (#431)
Suppowt embed images in
InteractionResponse.edit_message()(#466)Fix
afterpawametew ofGuild.audit_logs()(#473)Add
__str__toApplicationCommand, impwuv sync debug output (#478)Don’t wequiwe a
topicwhen cweating a stage channyew (#480)Update and add missing uvwwoads (#482)
Make
disnake.types.interactionsimpowtabwe at wuntime (#493)Waise
TypeErrorinstead of siwentwy wetuwnying when twying to defew an unsuppowted intewaction type (#505)Fix deway of
aftercawwback inAudioPlayerwhen stopping (#508)[ext.commands] Make convewsion exceptions in swash commands pwopagate cweanwy as documented (#362)
[ext.commands] F-Fix
clean_contentconvewtew (#396)[ext.commands] Fix usage of custom convewtews with
Param(#398)[ext.commands] Suppowt intewactions in
UserConverter,MemberConverter(#429)[ext.commands] Fix unwoading of wistenyews with custom nyames (#444)
[ext.commands] Fix pawametew nyame confwicts in swash commands (#503)
Documentation¶
Disabwe mathjax in documentation to impwuv woading times (#370)
Update wetuwn type of
Guild.create_template()(#372)Add documentation fow
GuildCommandInteraction,UserCommandInteraction, andMessageCommandInteraction(#374)Fix sevewaw b-bugs of wedesign (#377)
Update bwoken wefewences (#419)
Fix dupwicate seawch wesuwts, impwuv scowing (#423)
Add seawch hotkeys
ctrl+k,/,s(#434)Fix stwing escape wawnyings (#436)
Add sevewaw pweviouswy missing documentation entwies (#446, #470)
Add autocompwete decowatow exampwe (#472)
Update docs of A-ABCs to mention subcwasses (#506)
Update
on_member_update()documentation to incwude nyew and futuwe attwibutes (#510)Fix miscewwanyeous issues, impwuv fowmatting (#511)
Miscewwanyeous¶
v2.4.1¶
This wewease is a bugfix wewease with backpowts fwom v2.5.0 up to v-v-v2.5.2.
Bug Fixes¶
Fix missing
create_public_threadspewmission inPermissions.private_channel(#373)F-Fix wowe icon/emoji editing (#403)
Wemuv cached scheduwed events if associated channyew was d-d-deweted (#406)
U-Update some types/pawametews of wowes, scheduwed events and voice states (#407)
Awwow
contentpawametews in send/edit methods to be positionyaw (#411)Fix gateway watewimitew being too stwict (#413)
Fix caching of stage instances a-a-andd scheduwed events (#416)
Impwuv
PartialMessageablechannyew handwing (#426)Fix deway of
aftercawwback inAudioPlayerwhen stopping (#508)Change the defauwt guiwd
GuildStickerwimit to 5. (#531)Dispatch
disnake.on_reaction_remove()fowThreadinstances. (#536)Update
Guild.bitrate_limitto use the cowwect v-v-vawue fow theVIP_REGIONSfeatuwe fwag. (#538)Wemuv the
$pwefix fwomIDENTIFYpaywoad pwopewties. (#572)Fix opus function cawws on awm64 macOS. (#620)
Impwuv channyew/guiwd fawwback in wesowved intewaction data, using
PartialMessageablefow unhandwed/unknyown channyews instead of usingNone. (#646)[ext.commands] F-Fix
clean_contentconvewtew (#396)[ext.commands] Suppowt intewactions in
UserConverter,MemberConverter(#429)[e-ext.commands] Fix unwoading of wistenyews with custom nyames (#444)
[ext.commands] Handwe
VoiceChannelincommands.is_nsfw(). (#536)
Documentation¶
Update the wequests intewsphinx uww to the nyew uww of the wequests d-d-documentation. (#539)
Miscewwanyeous¶
Update dev dependencies and CI (#451)
v2.4.0¶
This vewsion contains many nyew featuwes, incwuding attachment options, modaws, and the abiwity to diwectwy send message componyents without views, as weww as sevewaw fixes and othew g-genyewaw impwuvments.
Bweaking Changes¶
- The constwuctow of
ApplicationCommandand its s-s-subtypes nyo wongew accepts**kwargsfow setting intewnyaw vawues (#249) This shouwdn’t affect anyonye, as
**kwargswas onwy u-u-used fow setting fiewds wetuwnyed by the API and had nyo effect if the usew set them
- The constwuctow of
Interaction.permissionsnyow wetuwns p-p-pwopew pewmission vawues in DMs (#321)The
reasonpawametew fow stickew endpoints inHTTPClientis n-n-nyow kwawg-onwy
Depwecations¶
N-Nyew Featuwes¶
Add
Interaction.localeandInteraction.guild_localepwopewties to intewactions (#225)Add
ui.ActionRowandcomponentskwawg to send methods (#224)- Add
ui.WrappedComponentas a base cwass fow aww UI componyents (#253) ui.Itemnyow inhewits fwomui.WrappedComponent. It’s nyo wongew a b-b-base cwass fow aww UI componyents.
- Add
- Impwement modaws and text inputs (#253)
Add
TextInputcomponyent.Add
ui.Modalas a high-wevew impwementation of modaws.Add
ui.TextInputfow m-m-modaws. It inhewits fwomui.WrappedComponentand adds mowe functionyawity on top ofTextInput.Add
InteractionResponse.send_modal()t-t-to suppowt nyew intewaction wesponse type.Add
on_modal_submit()event.
Use woggew fow appwication command sync debug (#230)
[ext.commands] Impwuv appwication command s-sync awgowithm (#240)
Use HTTP API v9 (#250)
[ext.commands] Add
commands.Range, see Nyumbew Wanges (#237, #276, #316)[ext.commands] Add
Bot.load_extensionsandutils.search_directory()(#245)[ext.commands] Add
commands.LargeInt(#264)Add
with_messagepawametew toInteractionResponse.defer()to suppowt defewwing componyent intewaction wesponses with messages (#248)Add
Widget.edit()(#266)Add the abiwity to specify a defauwt cowow fow embeds (#203)
Add
PartialInviteGuild.nsfw_levela-a-andPartialInviteGuild.vanity_url_code(#297)Add
Thread.create_timestamp(#285)Add
Message.thread(#291)Add
Permissions.eventsandPermissions.private_channel, impwuv existing factowy methods (#286, #321)Suppowt i-images in
GuildScheduledEvent(#280)Add
PartyType.sketch_headsandPartyType.ocho(#306)Interaction.bot,Interaction.client,Interaction.channelandInteraction.channel_idawe nyo wongew optionyaw (#279)Suppowt timeouts in
abc.GuildChannel.permissions_for()and othew channyew types (#289)Suppowt
disnake.Attachmentoptions in swash c-commands (#226)Add
attachmentspawametew toInteractionResponse.edit_message()(#335)Add
Guild.get_or_fetch_members()w-with an awiasGuild.getch_members()(#322).Add
abc.GuildChannel.jump_url,DMChannel.jump_urla-andThread.jump_url(#319)
Bug Fixes¶
Fix missing suppowt fow
reasonpawametew in some methods (#266)Impwuv vawidation of swash command and option nyames (#267)
[ext.commands] Fix typing of
ctxpawametew inConverter(#292)Fix
Guild.get_command()nyevew wetuwnying a-any commands (#333)Wetuwn wist of membews fwom
Guild.chunk()(#334)Fix handwing of uppewcase swash command nyames (#346)
Fix
permissionsannyotation ofabc.GuildChannel.set_permissions()(#349)F-F-Fix
tasks.loopusage with fixed times (#337)
Documentation¶
Miscewwanyeous¶
Impwuv typing/annyotations of sevewaw pawts o-of the wibwawy (#249, #256, #263, #279, #292, #299, #308)
Add additionyaw pwe-commit hooks fow devewopment (#233)
Add taskipy fow devewopment (#234)
I-Impwuv membew desewiawization (#304)
Spwit appwication c-c-command objects into sepawate types fow data w-w-wetuwnyed by the API (#299)
Update WEADME bannyew (#343)
v2.3.2¶
Bug Fixes¶
F-F-Fix invawid defauwt vawue fow appwication command option descwiptions (#338)
v2.3.1¶
Bug Fixes¶
[ext.commands] Fix Python 3.10 unyion type annyotations in swash commands (#231)
F-F-Fix d-doubwe
@when mentionying defauwt wowe (#244)Fix a command s-s-sync bug which pwevented wegistewing two appwication commands with the same nyame but diffewent types (#254)
Fix bug when editing a
Viewwith UWW buttons that wesuwted in therowattwibute being weset (#252)[ext.commands] Fix
MessageConverternyot defauwting to cuwwent channyew i-i-if nyo channyew ID specified (#284)Fix attachment d-descwiptions nyot wowking aftew wecent API change (#241)
Fix incowwect t-t-type check in
Guild.create_scheduled_event()usingStagePrivacyLevelinstead ofGuildScheduledEventPrivacyLevel(#263)[ext.commands] Fix exceptions that occuwwed when using a
Unionin a swash command pawametew annyotation[ext.commands] Fix dynyamic command coowdowns (#320)
Fix type-checking of
guild_ids/test_guildspawametews which couwd bweak appwication command caching (#300, #325)Fix
Guild.create_sticker()nyot wowking when nyo descwiption was pwovided (#328)
Documentation¶
Fix
guild_permissions()documentationFix missing d-d-dwopdown icon (#235)
Miscewwanyeous¶
v-v2.3.0¶
This vewsion contains sevewaw nyew featuwes and fixes, nyotabwy suppowt fow guiwd scheduwed e-events, guiwd timeouts, and a swash c-command wewowk with p-p-pawametew injections, as weww as sevewaw documentation fixes.
Nyote: the Vewsion Guawantees have been updated to mowe accuwatewy w-wefwect the vewsionying scheme this wibwawy is fowwowing.
Bweaking Changes¶
The suppowted aiohttp vewsion w-w-wange changed fwom
>=3.6.0,<3.8.0to>=3.7.0,<3.9.0Due to the u-u-upcoming text-in-voice featuwe (nyot yet weweased at the time of wwiting), many methods/pwopewties that pweviouswy wetuwnyed a
TextChannelcan nyow awso wetuwn aVoiceChannel, which shawes many but nyot aww of its methods. Awso s-see the detaiws fow text-in-voice undew “Nyew Featuwes” bewow, which incwude a few impowtant things to nyote.Swash c-c-command intewnyaws have undewgonye an extensive wewowk, and whiwe existing code shouwd s-s-stiww wowk as befowe, it is wecommended that you do some testing using the nyew impwementation fiwst
Bot.get_slash_commandmay nyow awso wetuwnSubCommandGroupowSubCommandinstances, see documentationdisnake.types.ThreadArchiveDurationis nyowThreadArchiveDurationLiteral, to avoid confusion with the nyewThreadArchiveDurationenyum
Depwecations¶
The
role_idsanduser_idspawametews fowguild_permissionsawe nyowrolesanduserswespectivewy; the owd pawametew nyames wiww be wemuvd in a futuwe vewsion
Nyew Featuwes¶
- Add guiwd scheduwed events (#151, #217)
Nyew intent:
Intents.guild_scheduled_events(enyabwed by defauwt)- Invite additions/changes
guild_scheduled_eventpawametew onabc.GuildChannel.create_invite()guild_scheduled_event_idpawametew onClient.fetch_invite()Incwude
eventUWW pawametew inInvite.urlif appwicabweSuppowt pawsing scheduwed event ID fwom invite UWWs
- Add guiwd timeouts (#161, #221, #223)
timeoutpawametew onMember.edit()Nyew pewmission:
Permissions.moderate_members
- Add pwewiminyawy suppowt fow text-in-voice (#162, #177)
M-Many methods/pwopewties that pweviouswy wetuwnyed a
TextChannelcan nyow awso wetuwn aVoiceChannel, which shawes many but nyot aww of its m-m-methods- Impowtant nyotes:
This featuwe is onwy avaiwabwe in a vewy wimited nyumbew of sewvews at the time o-o-of wwiting this, and the API is s-stiww being devewoped; thewefowe, expect changes in the futuwe
Text-in-voice cuwwentwy does nyot suppowt these text channyew featuwes (nyote: this is n-n-nyot guawanteed to b-be an exhaustive wist): thweads, webhooks, nsfw fwags, swowmode
The
nsfwandslowmode_delayvawues/pawametews awe cuwwentwy nyot suppowted by the API and awe stiww TBDPinnyed messages awe cuwwentwy nyot exposed in the cwient UI, and whiwe the API fow them wowks, theiw futuwe is uncewtain
VoiceChannelnyow inhewits fwomabc.MessageableNyew
VoiceChannelpwopewties:.nsfw,.slowmode_delay,.last_message_id,.last_messageNyew
VoiceChannelmethods:.is_nsfw,.get_partial_messagensfwandslowmode_delaypawametews fowVoiceChannel.edit()
- [e-ext.commands] Add pawametew injections (exampwe) (#130)
Add attachment descwiptions (see
File,Attachment) (#100)Add
on_raw_typing()event (#176)Add
Guild.approximate_member_countandGuild.approximate_presence_count(avaiwabwe on manyuawwy fetched guiwds) (#139)Add
ThreadArchiveDurationenyum, containying the cuwwentwy vawid vawues fow the thwead auto-awchive featuwe (#187)[ext.commands] Add
PermissionsConverter, which awwows the convewsion of a vawue ow a (wist o-of) pewmission nyames to aPermissionsinstance (using aPermissionsannyotation)Add
AppInfo.flags[ext.commands] Add
channel_typespawametew toParam/ParamInfo(#130)Add suppowt fow setting
slowmode_delayon thwead cweation (TextChannel.create_thread(),Message.create_thread()) (#132)Add
invitablepawametew t-toTextChannel.create_thread()(#132)Add
fail_if_not_existspawametew toMessage.reply()(#199, #211)[ext.commands]
Bot.get_slash_commandnyow wowks simiwaw toBot.get_command, in that it can awso wetuwn subcommands/gwoups fow inputs wike"foo bar"(#149)Add nyew awiases fow
ApplicationCommandInteraction:CommandInteraction,CmdInteraction,CommandInter,CmdInter,AppCommandInteractionAdd a base cwass fow wawnyings emitted by this wibwawy,
DiscordWarning(#118)Add nyew wawnyings (emitted instead of j-j-just using
printfow wawnyings):ConfigWarning,SyncWarning(#118)
B-Bug Fixes¶
Fix d-d-dispatch of typing events in DMs (#176)
Twy to wetwieve objects in weceived intewactions fwom cache fiwst (fixing pwopewties wike
Member.statuson membew pawametews fow commands) (#182, #213)Fix wetuwn type annyotation of
ui.button()andui.select()decowatows (#163)Fix incowwect U-U-UWW wetuwnyed by
Template.urlFix sending wocaw fiwes in embeds with intewactions/webhooks if onwy onye embed was specified (#193)
Fix weftuvw uses of
json, which didn’t useorjsonif avaiwabwe (#184)Fix
Message.channeltype beingDMChannelfow ephemewaw messages inon_message()(#197)Fix command/option nyame vawidation (#210)
Awways c-c-cwose fiwes aftew compweting HTTP wequests (#124)
[ext.commands] Fix unnyecessawy appwication command sync without changes
[ext.commands] Fix incowwect detection o-o-of depwecated guiwd commands in sync awgowithm whiwe sync is in pwogwess (#205)
Documentation¶
M-M-Muv documentation to https://docs.disnyake.dev/
Update Vewsion Guawantees (#200)
Cwawify
Interaction.original_message()documentation wegawding diffewent wesponse types (#140)Cwawify
Interaction.send()documentation (#188)Wediwect seawches fow
colortocolour(#153)Add documentation fow nyew guiwd featuwe vawues (#148)
- Add documentation fow sevewaw methods/pwopewties: (#153)
Fix incowwect t-type fow
Invite.channelin documentationAdd additionyaw infowmation about appwication command s-s-sync awgowithm and s-syncing commands i-in shawded bots (#205)
Miscewwanyeous¶
v2.2.3¶
Bug Fixes¶
Fix invawid defauwt vawue fow appwication command option descwiptions (#338)
v2.2.2¶
B-Bug Fixes¶
Fix channyew convewsion i-i-in audit wog entwies
Fix i-i-impwopew ewwow handwing in context menyu commands
Suppwy
ApplicationCommandInteraction.application_commandin a-autocompwete cawwbacksFix
Select.append_optionnyot waising an ewwow if 25 options have awweady been addedImpwuv check fow
optionspawametew on swash commands and subcommandsImpwuv p-p-pawametew pawsing fow convewtews
Fix wawnying wewated to nyew option pwopewties
Documentation¶
Update wepositowy winks to nyew owganyization
Fix dupwicate entwies in documentation
Fix i-incowwect
versionaddedtagsAdd documentation fow
InteractionBotandAutoShardedInteractionBot
v2.2.1¶
Bug Fixes¶
Fixed ewwow wewated to guiwd membew count
v2.2.0¶
Nyew Featuwes¶
Add kwawg
attachmentsto edit methodsAdd kwawgs
fileandfilestoInteractionResponse.edit_message(),PartialMessage.edit()andMessage.edit()Add kwawg
filetoEmbed.set_image()andEmbed.set_thumbnail()Add kwawg
delaytoInteraction.delete_original_message()andWebhookMessage.delete()Add kwawg
delete_aftertoInteractionResponse.send_message()andWebhookMessage.send()[ext.commands] Add
InvokableSlashCommand.autocomplete(awtewnyative method of adding autocompwete functions)[ext.commands] Add
SubCommand.autocomplete(awtewnyative method of adding autocompwete f-functions)[ext.commands] Add
Cog.cog_load[ext.commands] Ewwow handwews nyow can cancew each othew by wetuwnying
True
v2.1.5¶
Nyew Featuwes¶
Add
UnresolvedGuildApplicationCommandPermissionsAdd kwawgs
min_valueandmax_valueinOption[ext.commands] Add kwawg
min_value(with awiasesge,gt) toParam[ext.commands] A-A-Add kwawg
max_value(with awiasesle,lt) t-toParam[ext.commands] Add kwawg
ownertoguild_permissions
Bug Fixes¶
Command dewetions on weconnyections
P-P-Pending sync tasks on woop tewminyation
v2.1.4¶
Bug Fixes¶
Fixed some issues with appwication command pewmissions synchwonyisation
v2.1.3¶
Nyew Featuwes¶
Add
PartialGuildApplicationCommandPermissionsAdd
ApplicationCommandInteraction.filled_optionspwopewtyA-A-Add
on_message_command_completion[ext.commands] Add
InteractionBot[ext.commands] Add
guild_permissions[e-e-ext.commands] Add kwawgs
sync_commands_on_cog_unloadandsync_permissionstoInteractionBotBase
Bug Fixes¶
Music
default_permissionkwawg in usew / message commandsCommands nyo wongew sync duwing the woop tewminyation
v2.1.2¶
This is the fiwst stabwe vewsion of this d-d-discowd.py 2.0 fowk.
Nyew Featuwes¶
Add intewaction hiewawchy.
Interactionis nyow the base cwass fow othew intewaction types, such asApplicationCommandInteractionandMessageInteraction.Add intewaction data wwappews:
ApplicationCommandInteractionDataandMessageInteractionData.Add intewaction data option w-w-wwappew:
ApplicationCommandInteractionDataOptionAdd
Client.bulk_edit_command_permissions()Add
Client.edit_command_permissions()[ext.commands] Suppowt fow swash commands and context menyus.
[ext.commands] Add
InvokableApplicationCommand- the base cwass fow invokabwe swash commands and context menyus.[ext.commands] Add
InvokableSlashCommandfow swash command manyagement.[ext.commands] Add
SubCommandfow swash sub-command manyagement.[ext.commands] Add
SubCommandGroupfow swash sub-command gwoup manyagement.[ext.commands] Add
InvokableUserCommandfow usew command manyagement (context menyus).[ext.commands] Add
InvokableMessageCommandfow message command manyagement (context menyus).[ext.commands] Add
ParamInfofow wwapping annyotations.[ext.commands] Add
slash_commandfow swash command definyitions.[ext.commands] Add
user_commandfow u-usew command definyitions (context menyus).[ext.commands] Add
message_commandfow m-message command definyitions (context menyus).[e-e-ext.commands] Add
Param(with an awiasparam) in caseParamInfocauses wintew ewwows.[ext.commands] Add
Bot.slash_commandfow swash command definyitions.[ext.commands] Add
Bot.user_commandfow usew command d-d-definyitions (context menyus).[ext.commands] A-A-Add
Bot.message_commandfow message c-c-command definyitions (context menyus).[ext.commands] Add
Bot.after_slash_command_invoke- a decowatow fow post-invoke hooks fow swash commands.[ext.commands] Add
Bot.after_user_command_invoke- a decowatow fow post-invoke hooks fow usew commands.[ext.commands] Add
Bot.after_message_command_invoke- a decowatow fow post-invoke h-hooks fow message commands.[ext.commands] Add
Bot.before_slash_command_invoke- a decowatow fow pwe-invoke hooks fow swash commands.[ext.commands] Add
Bot.before_user_command_invoke- a d-d-decowatow fow pwe-invoke hooks fow usew commands.[ext.commands] Add
Bot.before_message_command_invoke- a decowatow fow pwe-invoke hooks fow message c-commands.
Wegacy Changewog¶
Changewogs fow owdew vewsions (0.x, 1.x) can be found on the Wegacy Changewog page.