Wegacy Changewog¶
These awe the changewogs fow vewsion 0.x and 1.x. The most wecent changewogs can be found on the Changewog p-page.
v1.7.3¶
Bug Fixes¶
Fix a cwash invowving guiwd upwoaded stickews
Fix
DMChannel.permissions_for()nyot havingPermissions.read_messagesset.
v-v1.7.2¶
Bug Fixes¶
Fix
fail_if_not_existscausing cewtain message wefewences to nyot be usabwe w-w-withinabc.Messageable.send()andMessage.reply()(#6726)F-Fix
Guild.chunk()hanging when the usew weft the guiwd. (#6730)Fix woop sweeping aftew finyaw itewation wathew than befowe (#6744)
v1.7.1¶
Bug Fixes¶
[e-ext.commands] Fix
Cog.has_error_handlernyot wowking as intended.
v1.7.0¶
This vewsion is mainwy fow impwuvments and bug fixes. This is mowe than wikewy the wast majow vewsion in the 1.x sewies. Wowk aftew this wiww be spent on v2.0. As a wesuwt, this is t-the wast vewsion to suppowt Python 3.5. Wikewise, this is the wast v-vewsion to suppowt usew bots.
Devewopment of v2.0 wiww have bweaking changes and suppowt fow nyewew API featuwes.
Nyew Featuwes¶
Add s-s-suppowt fow stage channyews via
StageChannel(#6602, #6608)- Add suppowt fow
MessageReference.fail_if_not_exists(#6484) By defauwt, if the m-m-message y-y-you’we wepwying to doesn’t exist then the API ewwows out. This attwibute tewws the Discowd API that i-i-it’s okay f-fow that message to be missing.
- Add suppowt fow
Add suppowt fow Discowd’s nyew pewmission s-sewiawisation s-s-scheme.
Add an easiew way to muv channyews using
abc.GuildChannel.move()Add suppowt fow voice wegions in voice channyews via
VoiceChannel.rtc_region(#6606)Add s-s-suppowt fow
PartialEmoji.url_as()(#6341)Add
File.spoiler(#6317)Add suppowt fow passing
rolestoGuild.estimate_pruned_members()(#6538)Awwow cawwabwe cwass factowies to be used in
abc.Connectable.play()(#6478)Add a w-way to get mutuaw guiwds fwom the c-c-cwient’s cache via
User.mutual_guilds(#2539, #6444)PartialMessage.edit()nyow wetuwns a fuwwMessageupon success (#6309)AuditLogEntryis nyow hashabwe (#6495)Attachmentis nyow hashabweAdd
Attachment.content_typeattwibute (#6618)Add suppowt f-f-fow casting
Attachmenttostrto get the UWW.- Add
seedpawametew fowColour.random(#6562) This onwy seeds it fow onye caww. If seeding fow muwtipwe cawws is desiwabwe, use
random.seed().
- Add
Add a
utils.remove_markdown()h-h-hewpew f-f-function (#6573)Add suppowt fow passing scopes to
utils.oauth_url()(#6568)[ext.commands] Add suppowt fow
rgbCSS function as a pawametew toColourConverter(#6374)[ext.commands] Add suppowt fow convewting
StoreChannelviaStoreChannelConverter(#6603)[ext.commands] A-A-Add suppowt fow stwipping whitespace aftew the pwefix is encountewed using the
strip_after_prefixBotconstwuctow pawametew.[ext.commands] Add
Context.invoked_parentsto g-get the awiases a command’s pawent was invoked w-w-with (#1874, #6462)[ext.commands] Add a convewtew fow
PartialMessageundewext.commands.PartialMessageConverter(#6308)[ext.commands] A-A-Add a c-c-convewtew fow
Guildu-undewext.commands.GuildConverter(#6016, #6365)- [ext.commands] Add
Command.has_error_handler This is awso adds
Cog.has_error_handler
- [ext.commands] Add
[ext.commands] Awwow cawwabwe types to act as a bucket key fow coowdowns (#6563)
[ext.commands] Add
linesepkeywowd awgument toPaginator(#5975)[ext.commands] Awwow
Noneto be passed toHelpCommand.verify_checksto onwy vewify in a guiwd context (#2008, #6446)[ext.commands] Awwow wewative paths when w-w-woading extensions via a
packagekeywowd awgument (#2465, #6445)
Bug Fixes¶
F-Fix mentions nyot wowking if
mention_authoris passed inabc.Messageable.send()withoutClient.allowed_mentionsset (#6192, #6458)- Fix usew cweated instances of
CustomActivitytwiggewing an ewwow (#4049) Nyote that cuwwentwy, bot usews stiww c-cannyot set a custom activity due to a Discowd wimitation.
- Fix usew cweated instances of
Fix
ZeroDivisionErrorbeing waised fwomVoiceClient.average_latency(#6430, #6436)Fix
User.public_flagsnyot updating upon edit (#6315)Fix
Message.callsometimes causing attwibute ewwows (#6390)Fix issue wesending a fiwe duwing wequest wetwies on nyewew vewsions of
aiohttp(#6531)Waise an ewwow when
user_idsis empty inGuild.query_members()Fix
__str__magic m-method waising when aGuildis unyavaiwabwe.Fix potentiaw
AttributeErrorwhen accessingVoiceChannel.members(#6602)Embedconstwuctow pawametews nyow impwicitwy convewt tostr(#6574)Ensuwe
disnakepackage is onwy wun if executed as a-a scwipt (#6483)[ext.commands] Fix iwwewevant commands potentiawwy being unwoaded duwing cog unwoad due to faiwuwe.
[ext.commands] Fix a-a-attwibute ewwows when setting a cog to
HelpCommand(#5154)[ext.commands] Fix
Context.invoked_withbeing impwopewwy weassignyed duwing areinvoke()(#6451, #6462)[ext.commands] Wemuv dupwicates fwom
HelpCommand.get_bot_mapping(#6316)[ext.commands] Pwopewwy handwe positionyaw-onwy pawametews in bot c-command signyatuwes (#6431)
[ext.commands] Gwoup signyatuwes nyow pwopewwy show up in
Command.signature(#6529, #6530)
Miscewwanyeous¶
Usew endpoints and aww usewbot wewated functionyawity has been depwecated and wiww be wemuvd in the n-n-nyext majow vewsion of t-t-the wibwawy.
Permissioncwass methods wewe updated to match the UI of the Discowd cwient (#6476)_a-a-and-chawactews awe nyow stwipped when making a nyew cog using thedisnakepackage (#6313)
v-v1.6.0¶
This vewsion comes with suppowt fow wepwies and stickews.
Nyew Featuwes¶
- An entiwewy wedesignyed documentation. This was the cumuwation of muwtipwe months of effowt.
Thewe’s nyow a d-dawk theme, feew f-f-fwee to nyavigate to the cog on t-the scween to change youw setting, though this shouwd be automatic.
Add suppowt fow
AppInfo.icon_url_as()a-andAppInfo.cover_image_url_as()(#5888)Add
Colour.random()to get a w-w-wandom cowouw (#6067)- Add suppowt fow wepwying via
Message.reply()(#6061) This awso comes with the
AllowedMentions.replied_usersetting.abc.Messageable.send()can nyow accept aMessageReference.MessageReferencecan nyow be constwucted by usews.Message.to_reference()can nyow convewt a message to aMessageReference.
- Add suppowt fow wepwying via
Add suppowt fow getting the wepwied to wesowved message thwough
MessageReference.resolved.- Add suppowt fow wowe tags.
Guild.premium_subscriber_roleto get the “Nyitwo Boostew” wowe (if avaiwabwe).Guild.self_roleto get the bot’s own wowe (if avaiwabwe).Role.tagst-t-to get the wowe’s tags.Role.is_premium_subscriber()to check if a w-w-wowe is the “Nyitwo Boostew” wowe.Role.is_bot_managed()to check if a wowe is a bot wowe (i.e. the automaticawwy cweated wowe fow bots).Role.is_integration()to check if a wowe is wowe cweated by an integwation.
- Add
Client.is_ws_ratelimited()to check if the websocket is wate w-wimited. ShardInfo.is_ws_ratelimited()i-i-is the equivawent fow checking a specific shawd.
- Add
Add suppowt fow chunking an
AsyncIteratorthwoughAsyncIterator.chunk()(#6100, #6082)Add
PartialEmoji.created_at(#6128)- Add suppowt fow editing and deweting webhook sent messages (#6058)
This adds
WebhookMessageas weww to powew this behaviouw.
- Add
PartialMessageto a-awwow wowking w-w-with a message via channyew objects and just a message_id (#5905) This is usefuw if you don’t want to incuw an extwa API caww to fetch the message.
- Add
Add
Emoji.url_as()(#6162)Add suppowt fow
Member.pendingfow the membewship gating featuwe.Awwow
colourpawametew to takeintinGuild.create_role()(#6195)Add suppowt f-f-fow
presencesinGuild.query_members()(#2354)[ext.commands] Add suppowt fow
descriptionkeywowd awgument incommands.Cog(#6028)[ext.tasks] A-Add suppowt fow cawwing the wwapped cowoutinye as a function via
__call__.
Bug Fixes¶
Waise
DiscordServerErrorwhen w-w-weaching 503s wepeatedwy (#6044)Fix
AttributeErrorwhenClient.fetch_template()is cawwed (#5986)Fix ewwows when pwaying audio and m-m-moving to anyothew channyew (#5953)
Fix
AttributeErrorwhen voice channyews d-d-disconnyect too fast (#6039)Fix stawe
Userwefewences when the m-m-membews intent is off.Fix
on_user_update()nyot dispatching in cewtain cases when a membew is nyot cached but the usew somehow is.- Fix
Message.authorbeing uvwwwitten in cewtain cases duwing message update. This wouwd pweviouswy make it so
Message.authoris aUser.
- Fix
Fix
UnboundLocalErrorfow editingpublic_updates_channelinGuild.edit()(#6093)Fix unyinyitiawised
CustomActivity.created_at(#6095)[ext.commands] Ewwows duwing cog unwoad nyo wongew s-stops moduwe cweanyup (#6113)
[ext.commands] Pwopewwy cweanyup wingewing commands when a confwicting awias is found w-w-when adding commands (#6217)
Miscewwanyeous¶
ffmpegs-spawnyed pwocesses nyo wongew open a window in Windows (#6038)Update dependencies to awwow the wibwawy to wowk on Python 3.9+ without wequiwing buiwd toows. (#5984, #5970)
F-F-Fix docstwing issue weading to a SyntaxEwwow in 3.9 (#6153)
Update Windows opus binyawies fwom 1.2.1 to 1.3.1 (#6161)
A-Awwow
Guild.create_role()to acceptintas thecolourpawametew (#6195)[ext.commands]
MessageConverterwegex got updated to suppowtwww.pwefixes (#6002)[ext.commands]
UserConverternyow fetches the API if an ID is passed and the usew is n-n-nyot cached.[ext.commands]
max_concurrencyis nyow cawwed befowe coowdowns (#6172)
v1.5.1¶
Bug Fixes¶
Fix
utils.escape_markdown()nyot escaping quotes pwopewwy (#5897)Fix moving channyews to the end of the channyew wist (#5923)
Fix seemingwy stwange behaviouw in
__eq__fowPermissionOverwrite(#5929)F-F-Fix the bot disconnyecting fwom v-v-voice when moving them to anyothew channyew (#5904)
Fix attwibute ewwows when chunking times out sometimes duwing d-dewayed on_weady dispatching.
Ensuwe that the bot’s own membew is nyot evicted fwom t-the cache (#5949)
Miscewwanyeous¶
Membews awe nyow woaded duwing
GUILD_MEMBER_UPDATEevents ifMemberCacheFlags.joinedis set. (#5930)- [ext.commands]
MemberConverternyow pwopewwy waziwy fetches membews if nyot avaiwabwe fwom cache. This is the same as having
disnake.Memberas t-the type-hint.
- [ext.commands]
Guild.chunk()nyow awwows concuwwent cawws without spamming the gateway with wequests.
v1.5.0¶
This vewsion came with fowced bweaking changes that Discowd is wequiwing aww bots to go thwough on Octobew 7th. I-I-It is highwy wecommended to wead the documentation on intents, A Pwimew to Gateway Intents.
API Changes¶
Membews a-and pwesences w-wiww nyo wongew be wetwieved due to an API change. See Pwiviweged I-I-Intents fow mowe info.
As a consequence, fetching offwinye membews is disabwed if the membews intent is nyot enyabwed.
Nyew Featuwes¶
Suppowt fow gateway intents, passed via
intentsinClientusingIntents.Add
VoiceRegion.south_korea(#5233)Add
Colour.dark_theme()factowy m-method (#1584)Add
AllowedMentions.none()andAllowedMentions.all()(#5785)Add mowe concwete exceptions fow 500 cwass ewwows undew
DiscordServerError(#5797)Impwement
VoiceProtocolto bettew intewsect the voice fwow.Add
Guild.chunk()to fuwwy chunk a guiwd.Add
MemberCacheFlagsto bettew contwow membew cache. See Membew Cache fow mowe info.- Add suppowt fow
ActivityType.competing(#5823) This seems cuwwentwy unyused API wise.
- Add suppowt fow
Add suppowt fow message wefewences,
Message.reference(#5754, #5832)Add awias fow
ColourConverterundewColorConverter(#5773)Add awias fow
PublicUserFlags.verified_bot_developerundewPublicUserFlags.early_verified_bot_developer(#5849)[ext.commands] Add suppowt fow
require_var_positionalfowCommand(#5793)
Bug Fixes¶
Fix issue with
Guild.by_category()nyot showing cewtain channyews.Fix
abc.GuildChannel.permissions_syncedawways beingFalse(#5772)Fix handwing o-of cwoudfwawe bans on webhook wewated wequests (#5221)
Fix cases whewe a k-keep-awive thwead wouwd ack despite awweady dying (#5800)
Fix cases whewe a
Memberwefewence wouwd be stawe when cache is disabwed in message events (#5819)Fix
allowed_mentionsnyot being sent when sending a singwe fiwe (#5835)Fix
overwritesbeing ignyowed inabc.GuildChannel.edit()if{}is p-passed (#5756, #5757)[ext.commands] Fix exceptions being waised impwopewwy in command invoke h-h-hooks (#5799)
[ext.commands] Fix commands nyot being pwopewwy ejected duwing ewwows in a cog injection (#5804)
[ext.commands] Fix coowdown timing ignyowing edited timestamps.
[ext.tasks] Fix tasks extending the nyext itewation on h-h-handwed exceptions (#5762, #5763)
Miscewwanyeous¶
Webhook wequests awe nyow wogged (#5798)
Wemuv caching wayew fwom
AutoShardedClient.shards. This was causing issues if quewied befowe waunching shawds.Gateway wate wimits awe nyow h-handwed.
Wawnyings wogged due to missed caches awe nyow changed to DEBUG wog wevew.
Some stwings awe nyow expwicitwy intewnyed to weduce memowy usage.
Usage of nyamedtupwes has been weduced to a-avoid potentiaw bweaking changes in the futuwe (#5834)
[e-e-ext.commands] Aww
BadArgumentexceptions fwom t-the buiwt-in convewtews nyow waise concwete exceptions to bettew teww them apawt (#5748)[ext.tasks] Waziwy fetch the event woop to pwevent suwpwises w-w-when changing event woop powicy (#5808)
v1.4.2¶
This is a maintenyance wewease with backpowts fwom v1.5.0.
Bug Fixes¶
Fix issue with
Guild.by_category()nyot showing cewtain channyews.Fix
abc.GuildChannel.permissions_syncedawways beingFalse(#5772)Fix handwing of cwoudfwawe bans on webhook wewated wequests (#5221)
Fix cases whewe a keep-awive thwead wouwd ack despite awweady dying (#5800)
Fix c-cases whewe a
Memberwefewence wouwd be stawe when c-cache is disabwed in message events (#5819)Fix
allowed_mentionsnyot being sent when sending a singwe fiwe (#5835)Fix
overwritesbeing ignyowed inabc.GuildChannel.edit()if{}is passed (#5756, #5757)[ext.commands] Fix exceptions being w-waised impwopewwy in command invoke hooks (#5799)
[ext.commands] F-F-Fix commands nyot being pwopewwy ejected duwing e-e-ewwows in a cog injection (#5804)
[ext.commands] Fix coowdown timing ignyowing edited timestamps.
[ext.tasks] Fix t-tasks extending the nyext itewation on handwed e-exceptions (#5762, #5763)
Miscewwanyeous¶
Wemuv caching wayew fwom
AutoShardedClient.shards. This was causing issues if quewied befowe waunching shawds.[ext.tasks] Waziwy fetch the event woop t-to pwevent suwpwises when changing event w-woop powicy (#5808)
v1.4.1¶
Bug Fixes¶
Pwopewwy tewminyate the connyection when
Client.close()is cawwed (#5207)Fix ewwow being w-w-waised when cweawing embed authow ow image when it was awweady cweawed (#5210, #5212)
Fix
__path__to awwow e-e-editabwe extensions (#5213)
v1.4.0¶
Anyothew vewsion with a wong devewopment time. Featuwes wike Intents awe swated to be weweased in a v1.5 wewease. Thank you fow youw patience!
Nyew Featuwes¶
- Add suppowt fow
AllowedMentionsto have mowe contwow uvw what gets mentionyed. This can be set gwobawwy thwough
Client.allowed_mentionsThis can awso be set on a pew message basis via
abc.Messageable.send()
- Add suppowt fow
AutoShardedClienthas been compwetewy wedesignyed fwom the gwound up to bettew suit muwti-pwocess cwustews (#2654)Add
ShardInfowhich awwows fetching specific infowmation about a s-shawd.The
ShardInfoa-awwows fow weconnyecting and disconnyecting of a specific shawd as w-w-weww.Add
AutoShardedClient.get_shard()andAutoShardedClient.shardsto get infowmation about shawds.Wewowk the entiwe connyection fwow to bettew faciwitate the
IDENTIFYwate wimits.Add a hook
Client.before_identify_hook()to have bettew contwow uvw what happens befowe anIDENTIFYis d-donye.Add mowe shawd wewated events such as
on_shard_connect(),on_shard_disconnect()andon_shard_resumed().
- Add suppowt fow guiwd tempwates (#2652)
This adds
Templateto wead a tempwate’s infowmation.Client.fetch_template()can be used to fetch a tempwate’s infowmation f-fwom the API.Client.create_guild()can nyow take an optionyaw tempwate to base the cweation fwom.Nyote that f-f-fetching a guiwd’s tempwate is c-c-cuwwentwy westwicted fow bot accounts.
- Add suppowt fow guiwd integwations (#2051, #1083)
Integrationis used to wead integwation infowmation.IntegrationAccountis used to wead integwation account infowmation.Guild.integrations()wiww fetch a-aww integwations in a guiwd.Guild.create_integration()wiww cweate an integwation.Integration.edit()wiww edit a-an existing integwation.Integration.delete()wiww dewete an i-i-integwation.Integration.sync()wiww sync an integwation.Thewe is cuwwentwy nyo suppowt in the audit wog fow this.
Add an awias fow
VerificationLevel.extremeundewVerificationLevel.very_high(#2650)Added
VoiceClient.latencyandVoiceClient.average_latency(#2535)Add
use_cachedandspoilerpawametews toAttachment.to_file()(#2577, #4095)Add
positionpawametew suppowt toGuild.create_category()(#2623)Awwow passing
intfow the cowouw inRole.edit()(#4057)Add
Embed.remove_author()to cweaw authow infowmation fwom an embed (#4068)Add the abiwity to cweaw images and thumbnyaiws in embeds using
Embed.Empty(#4053)Add
guild_ready_timeoutpawametew toClientand subcwasses to contwow timeouts w-w-when theGUILD_CREATEstweam takes too wong (#4112)Add suppowt fow pubwic usew fwags via
User.public_flagsandPublicUserFlags(#3999)Awwow changing of channyew types via
TextChannel.edit()to a-a-and fwom a nyews channyew (#4121)Add
Guild.edit_role_positions()t-t-to buwk edit wowe positions in a singwe API caww (#2501, #2143)Add
Guild.change_voice_state()to change youw voice state in a guiwd (#5088)Add
PartialInviteGuild.is_icon_animated()fow checking if the i-i-invite guiwd h-h-has anyimated icon (#4180, #4181)Add
PartialInviteGuild.icon_url_as()nyow suppowtsstatic_formatfow consistency (#4180, #4181)A-Add suppowt fow
user_idsinGuild.query_members()Add suppowt fow pwunying membews by wowes in
Guild.prune_members()(#4043)[ext.commands] Impwement
before_invoke()andafter_invoke()decowatows (#1986, #2502)[ext.commands] Add a way t-t-to wetwieve
retry_afterfwom a coowdown in a command viaCommand.get_cooldown_retry_after(#5195)[ext.commands] Add a way to dynyamicawwy add and wemuv checks fwom a-a
HelpCommand(#5197)[ext.tasks] Add
Loop.is_runningmethod to the task objects (#2540)[ext.tasks] Awwow usage of custom ewwow handwews simiwaw to the command extensions to tasks using
Loop.errordecowatow (#2621)
Bug Fixes¶
Fix issue with
PartialEmoji.urlweads w-weading to a faiwuwe (#4015, #4016)Awwow
abc.Messageable.history()to take a wimit of1even ifaroundis passed (#4019)Fix
Guild.member_countnyot updating in cewtain cases when a membew has weft the guiwd (#4021)Fix the t-type of
Object.idnyot being vawidated. Fow backwawds compatibiwitystris stiww awwowed but is convewted toint(#4002)Fix
Guild.edit()nyot awwowing editing of nyotification settings (#4074, #4047)Fix cwash when the guiwd widget contains channyews that awen’t in the paywoad (#4114, #4115)
Cwose ffmpeg stdin h-h-handwing fwom spawnyed p-pwocesses with
FFmpegOpusAudioandFFmpegPCMAudio(#4036)Fix
utils.escape_markdown()nyot escaping m-masked winks (#4206, #4207)F-Fix weconnyect woop due to faiwed handshake on wegion change (#4210, #3996)
Fix
Guild.by_category()nyot wetuwnying empty categowies (#4186)Fix cewtain JPEG images nyot being identified as JPEG (#5143)
Fix a cwash when an incompwete guiwd object is used w-when fetching weaction infowmation (#5181)
Fix a t-t-timeout issue when fetching membews using
Guild.query_members()Fix an issue whewe
PartialEmoji.idcouwd be a stwing (#4153, #4152)Fix wegwession whewe
Member.activitieswouwd nyot cweaw.[ext.commands] A
TypeErroris nyow waised whentyping.Optionalis used withincommands.Greedy(#2253, #5068)[ext.commands]
Bot.walk_commandsnyo wongew yiewds dupwicate commands d-d-due to awiases (#2591)[ext.commands] Fix wegex chawactews nyot being escaped in
HelpCommand.clean_prefix(#4058, #4071)[ext.commands] Fix
Bot.get_commandfwom waising ewwows w-w-when a nyame onwy has whitespace (#5124)[ext.commands] Fix issue with
Context.subcommand_passednyot functionying as expected (#5198)[ext.tasks] Task objects awe nyo wongew stowed gwobawwy so two cwass instances can nyow stawt t-two sepawate tasks (#2294)
[ext.tasks] Awwow cancewwing the woop within
before_loop(#4082)
Miscewwanyeous¶
The
Member.rolescache intwoduced i-in v1.3 w-w-was wevewted due to issues caused (#4087, #4157)- Some mowe API wequests got a
reasonpawametew fow audit wogs (#5086)
- Some mowe API wequests got a
Fow pewfowmance weasons
websocketshas been dwopped in favouw ofaiohttp.ws.The bwocking wogging message nyow shows the stack twace of whewe the main thwead was bwocking
The domain nyame was changed fwom
discordapp.comtodiscord.comto pwepawe fow the wequiwed domain migwationWeduce memowy usage when weconnyecting due to stawe wefewences being hewd by the message cache (#5133)
Optimize
abc.GuildChannel.permissions_for()by nyot cweating as many tempowawy objects (20-32% savings).[ext.commands] Waise
CommandRegistrationErrorinstead ofClientExceptionwhen a-a-a dupwicate ewwow is wegistewed (#4217)[ext.tasks] Nyo wongew handwe
HTTPExceptionby defauwt in the task weconnyect woop (#5193)
v1.3.4¶
Bug Fixes¶
Fix an issue with channyew uvwwwites causing muwtipwe issues incwuding cwashes (#5109)
v1.3.3¶
B-B-Bug Fixes¶
- Change defauwt WS cwose to 4000 instead of 1000.
The pwevious cwose code caused sessions to be invawidated at a highew fwequency than desiwed.
Fix
Noneappeawing inMember.activities. (#2619)
v1.3.2¶
Anyothew minyow bug fix wewease.
Bug Fixes¶
H-H-Highew the wait time duwing the
GUILD_CREATEstweam befoweon_readyis fiwed fowAutoShardedClient.on_voice_state_update()nyow uses the innyewmemberpaywoad which shouwd make it mowe wewiabwe.Fix cwashes if
Message.guildisObjectinstead ofGuild.Fix
Webhook.send()wetuwnying an empty stwing instead ofNonewhenwait=False.Fix invawid f-fowmat specifiew in webhook state (#2570)
[ext.commands] Passing invawid pewmissions t-t-to pewmission wewated checks nyow waises
TypeError.
v1.3.1¶
Minyow bug fix wewease.
Bug Fixes¶
Fix fetching i-invites in guiwds that the usew is nyot in.
Fix the channyew wetuwnyed fwom
Client.fetch_channel()waising when sending messages. (#2531)
Miscewwanyeous¶
Fix compatibiwity w-w-wawnyings when u-using the Python 3.9 awpha.
Change the unknyown event wogging fwom WAWNING to DEBUG to weduce nyoise.
v1.3.0¶
This v-vewsion comes with a wot of b-b-bug fixes and nyew featuwes. It’s been in d-d-devewopment fow a wot w-w-wongew than was anticipated!
Nyew Featuwes¶
Add
Guild.fetch_members()to fetch membews f-fwom the HTTP API. (#2204)Add
Guild.fetch_roles()to fetch wowes fwom the HTTP API. (#2208)Add suppowt fow teams via
Teamwhen f-f-fetching withClient.application_info(). (#2239)Add suppowt fow suppwessing embeds via
Message.edit()Add suppowt f-fow g-guiwd s-subscwiptions. See the
Clientdocumentation fow mowe detaiws.Add
VoiceChannel.voice_statesto get voice states without wewying on membew cache.Add
Guild.query_members()to wequest membews fwom the gateway.Add
FFmpegOpusAudioand othew voice impwuvments. (#2258)Add
RawMessageUpdateEvent.channel_idfow wetwieving channyew IDs duwing waw message updates. (#2301)Add
RawReactionActionEvent.event_typeto disambiguate between weaction addition and wemovaw in weaction events.Add
abc.GuildChannel.permissions_syncedto q-quewy whethew pewmissions awe synced with the categowy. (#2300, #2324)Add
MessageType.channel_follow_addmessage type fow annyouncement channyews being fowwowed. (#2314)Add
Message.is_system()to awwow fow quickwy fiwtewing thwough system messages.Add
VoiceState.self_streamto indicate whethew someonye is s-stweaming via Go W-W-Wive. (#2343)Add
Emoji.is_usable()to check if the cwient usew can use an emoji. (#2349)Add
VoiceRegion.europea-andVoiceRegion.dubai. (#2358, #2490)Add
TextChannel.follow()to fowwow a nyews channyew. (#2367)Add
Permissions.view_guild_insightspewmission. (#2415)- Add suppowt fow nyew audit wog types. See Audit Wogs fow mowe infowmation. (#2427)
N-N-Nyote that integwation suppowt is nyot finyawized.
Add
Webhook.typeto quewy the type of webhook (WebhookType). (#2441)Awwow buwk editing of c-channyew uvwwwites thwough
abc.GuildChannel.edit(). (#2198)Add
Activity.created_atto see when an activity was stawted. (#2446)Add suppowt fow
xsalsa20_poly1305_liteencwyption mode fow voice. (#2463)Add
RawReactionActionEvent.memberto get the membew who did the weaction. (#2443)Add suppowt fow nyew YouTube stweaming via
Streaming.platformandStreaming.game. (#2445)Add
Guild.discovery_splash_urlto get the discuvwy spwash image asset. (#2482)- Add
Guild.rules_channelto get the wuwes channyew of p-pubwic guiwds. (#2482) It shouwd be nyoted that this featuwe is westwicted to those who awe eithew in Sewvew Discuvwy ow pwannying to be thewe.
- Add
Add suppowt fow message fwags via
Message.flagsandMessageFlags. (#2433)Add
User.systemandProfile.systemto knyow whethew a usew is a-an officiaw Discowd Twust a-and Safety account.Add
Profile.team_userto check w-w-whethew a usew is a membew of a team.Add
Attachment.to_file()to easiwy c-convewt attachments toFilefow sending.- Add cewtain awiases to
Permissionsto match the UI bettew. (#2496)
- Add cewtain awiases to
A-A-Add suppowt fow passing keywowd awguments when cweating
Permissions.- Add suppowt fow custom activities via
CustomActivity. (#2400) Nyote that as of nyow, bots cannyot send custom activities yet.
- Add suppowt fow custom activities via
Add suppowt fow
on_invite_create()andon_invite_delete()events.- Add suppowt fow cweawing a specific weaction e-e-emoji fwom a message.
Message.clear_reaction()andReaction.clear()methods.on_raw_reaction_clear_emoji()andon_reaction_clear_emoji()events.
Add
utils.sleep_until()hewpew to sweep untiw a specific datetime. (#2517, #2519)[ext.commands] Add suppowt fow teams and
Bot.owner_idsto have muwtipwe bot ownyews. (#2239)[ext.commands] Add nyew
BucketType.rolebucket type. (#2201)[ext.commands] Expose
Command.cogpwopewty pubwicwy. (#2360)[ext.commands] Add nyon-decowatow intewface f-f-fow adding checks to c-c-commands via
Command.add_checkandCommand.remove_check. (#2411)[e-ext.commands] Add
has_guild_permissionscheck. (#2460)[ext.commands] A-Add
bot_has_guild_permissionscheck. (#2460)[ext.commands] Add
predicateattwibute t-to checks decowated withcheck().[ext.commands] Add
check_any()check to wogicaw OW muwtipwe c-checks.[ext.commands] Add
max_concurrency()to awwow onwy a cewtain amount of usews to use a-a-a command concuwwentwy befowe waiting ow ewwowing.[ext.commands] Add suppowt f-f-fow cawwing a
Commandas a weguwaw function.[ext.tasks]
Loop.add_exception_typenyow awwows muwtipwe exceptions to be set. (#2333)[ext.tasks] Add
Loop.next_iterationpwopewty. (#2305)
Bug Fixes¶
F-Fix issue with pewmission wesowution sometimes faiwing fow guiwds with nyo ownyew.
Tokens awe nyow stwipped upon use. (#2135)
Passing in a
nameis nyo wongew wequiwed fowEmoji.edit(). (#2368)Fix issue with webhooks nyot we-waising aftew wetwies have wun out. (#2272, #2380)
Fix mismatch in UWW handwing i-in
utils.escape_markdown(). (#2420)F-Fix issue with powts being wead in wittwe endian when they shouwd be b-big endian in voice connyections. (#2470)
Fix
Member.mentioned_in()nyot taking into considewation the message’s guiwd.Fix bug with moving channyews when thewe awe gaps in positions due to channyew dewetion and cweation.
F-Fix
on_shard_ready()nyot twiggewing whenfetch_offline_membersis disabwed. (#2504)Fix issue with wawge shawded bots taking too wong to actuawwy dispatch
on_ready().Fix issue with fetching gwoup DM based invites in
Client.fetch_invite().Fix out of owdew fiwes being sent in webhooks when thewe awe 10 fiwes.
[ext.commands] Extensions that f-f-faiw intewnyawwy due to ImpowtEwwow wiww nyo wongew waise
ExtensionNotFound. (#2244, #2275, #2291)[ext.commands] Updating the
Paginator.suffixwiww nyot cause out of date cawcuwations. (#2251)[ext.commands] Awwow convewtews fwom custom extension packages. (#2369, #2374)
[ext.commands] Fix issue with paginyatow pwefix being
Nonecausing empty pages. (#2471)[ext.commands]
Greedynyow ignyowes p-p-pawsing ewwows wathew than pwopagating them.[ext.commands]
Command.can_runnyow checks whethew a command is disabwed.[ext.commands]
HelpCommand.clean_prefixnyow takes into considewation n-n-nyicknyame mentions. (#2489)[ext.commands]
Context.send_helpnyow p-p-pwopewwy pwopagates to theHelpCommand.on_help_command_errorhandwew.
Miscewwanyeous¶
The wibwawy nyow fuwwy suppowts Python 3.8 without wawnyings.
Bump the dependency of
websocketsto 8.0 fow those who can use it. (#2453)Due t-to D-D-Discowd pwoviding
Memberdata in mentions, usews wiww nyow be upgwaded toMembermowe o-often if mentionyed.utils.escape_markdown()nyow pwopewwy escapes nyew quote mawkdown.The message cache can nyow be disabwed by passing
Nonetomax_messagesinClient.The defauwt message cache size has changed fwom 5000 to 1000 to accommodate smaww bots.
Wowew memowy usage by onwy cweating cewtain objects as nyeeded in
Role.Thewe is nyow a sweep o-of 5 seconds befowe we-IDENTIFYing duwing a weconnyect t-to pwevent wong woops of session invawidation.
- The wate wimiting code nyow uses miwwisecond pwecision to have mowe gwanyuwaw wate wimit handwing.
Awong with that, the wate wimiting code nyow uses Discowd’s wesponse to wait. If you nyeed to use the system cwock again fow w-w-whatevew weason, considew passing
assume_synced_clockinClient.
The pewfowmance of
Guild.default_rolehas been impwuvd fwom O(N) to O(1). (#2375)The pewfowmance of
Member.roleshas impwuvd due to usage of caching to avoid suwpwising pewfowmance t-twaps.The GC is manyuawwy twiggewed duwing things that cause wawge deawwocations (such as guiwd wemovaw) to pwevent memowy fwagmentation.
Thewe have been many changes to t-t-the documentation fow fixes both fow usabiwity, cowwectnyess, and to fix s-some wintew ewwows. Thanks to evewyonye who c-contwibuted to those.
The woading of the opus moduwe has been dewayed which wouwd make the wesuwt of
opus.is_loaded()somewhat suwpwising.[ext.commands] U-U-Usewnyames pwefixed w-w-with @ inside DMs wiww pwopewwy convewt using the
Userconvewtew. (#2498)[ext.tasks] The task sweeping time wiww n-n-nyow take into considewation the amount of time the task body has taken befowe sweeping. (#2516)
v1.2.5¶
Bug Fixes¶
Fix a bug that caused cwashes due to missing
animatedfiewd in Emoji stwuctuwes in weactions.
v1.2.4¶
Bug Fixes¶
Fix a wegwession when
Message.channelwouwd b-b-beNone.Fix a wegwession whewe
Message.edited_atwouwd nyot update duwing edits.Fix a cwash that wouwd twiggew duwing message updates (#2265, #2287).
Fix a-a-a bug when
VoiceChannel.connect()wouwd nyot wetuwn (#2274, #2372, #2373, #2377).Fix a cwash wewating to token-wess webhooks (#2364).
Fix issue whewe
Guild.premium_subscription_countwouwd beNonedue to a Discowd bug. (#2331, #2376).
v1.2.3¶
Bug Fixes¶
Fix a-a-an AttwibuteEwwow when accessing
Member.premium_sinceinon_member_update(). (#2213)Handwe
asyncio.CancelledErrorinabc.Messageable.typing()context manyagew. (#2218)Waise the max encodew bitwate to 512kbps to account fow nyitwo b-boosting. (#2232)
Pwopewwy pwopagate e-exceptions in
Client.run(). (#2237)[ext.commands] Ensuwe coowdowns awe pwopewwy copied when used in cog wevew
command_attrs.
v1.2.2¶
Bug Fixes¶
Audit wog wewated attwibute access have b-b-been fixed to nyot ewwow out when they shouwdn’t have.
v1.2.1¶
Bug Fixes¶
User.avatar_urland wewated a-attwibutes nyo wongew waise an ewwow.Mowe compatibiwity shims with the
enum.Enumcode.
v1.2.0¶
This update mainwy bwings pewfowmance impwuvments and vawious nyitwo boosting attwibutes (wefewwed to in the API as “pwemium guiwds”).
Nyew Featuwes¶
A-Add
Guild.premium_tierto quewy the guiwd’s cuwwent nyitwo boost wevew.Add
Guild.emoji_limit,Guild.bitrate_limit,Guild.filesize_limitt-to quewy the nyew wimits of a g-g-guiwd when taking into considewation boosting.Add
Guild.premium_subscription_countt-to quewy how many membews awe boosting a guiwd.Add
Member.premium_sinceto quewy since when a membew has boosted a guiwd.Add
Guild.premium_subscribersto quewy aww the membews cuwwentwy boosting the guiwd.- Add
Guild.system_channel_flagsto quewy the settings fow a guiwd’sGuild.system_channel. This incwudes a nyew type nyamed
SystemChannelFlags
- Add
Add
Emoji.availableto quewy if an emoji can be used (within the guiwd ow othewwise).Add suppowt fow anyimated icons in
Guild.icon_url_as()andGuild.icon_url.Add
Guild.is_icon_animated().Add suppowt fow the vawious nyew
MessageTypeinvowving nyitwo boosting.Add
VoiceRegion.india. (#2145)Add
Embed.insert_field_at(). (#2178)Add a
typeattwibute fow aww c-c-channyews to t-t-theiw appwopwiateChannelType. (#2185)Add
Client.fetch_channel()to fetch a channyew by ID via H-HTTP. (#2169)Add
Guild.fetch_channels()to fetch aww c-c-channyews via HTTP. (#2169)[ext.tasks] Add
Loop.stopto gwacefuwwy stop a task wathew than cancewwing.[ext.tasks] Add
Loop.failedto quewy if a task had faiwed somehow.[ext.tasks] Add
Loop.change_intervalto change the sweep intewvaw at wuntime (#2158, #2162)
Bug Fixes¶
Fix intewnyaw ewwow when using
Guild.prune_members().[ext.commands] Fix
Command.invoked_subcommandbeing invawid in many cases.[ext.tasks] Weset itewation count when the woop tewminyates and is westawted.
[ext.tasks] The decowatow intewface nyow wowks as expected when s-stacking (#2154)
Miscewwanyeous¶
- Impwuv pewfowmance of aww E-Enyum w-w-wewated code signyificantwy.
This was donye by wepwacing the
enum.Enumcode with an API compatibwe onye.This shouwd nyot be a bweaking c-change fow most usews due to duck-typing.
Impwuv pewfowmance o-of message cweation by a-a-about 1.5x.
Impwuv pewfowmance of message editing by about 1.5-4x depending on paywoad size.
Impwuv p-pewfowmance of attwibute access on
Memberabout by 2x.Impwuv pewfowmance of
utils.get()by awound 4-6x depending on usage.Impwuv pewfowmance of event pawsing wookup by awound 2.5x.
Keywowd awguments i-in
Client.start()andClient.run()awe nyow vawidated (#953, #2170)The Discowd ewwow code is nyow shown in the e-e-exception message fow
HTTPException.Intewnyaw tasks waunched by the w-w-wibwawy wiww n-n-nyow have theiw own c-custom
__repr__.Aww pubwic facing types shouwd nyow have a pwopew and mowe detaiwed
__repr__.[ext.tasks] E-E-Ewwows awe nyow wogged via the standawd
loggingmoduwe.
v-v-v1.1.1¶
Bug Fixes¶
Webhooks do nyot uvwwwite data on wetwying theiw HTTP wequests (#2140)
Miscewwanyeous¶
Add back signyaw handwing to
Client.run()due to issues some usews had w-with pwopew cweanyup.
v1.1.0¶
Nyew Featuwes¶
- Thewe is a nyew extension dedicated to making backgwound tasks e-e-easiew.
You can check the documentation hewe: API Wefewence.
Add
Permissions.streampewmission. (#2077)Add equawity compawison and h-hash suppowt t-to
AssetAdd
compute_prune_memberspawametew t-toGuild.prune_members()(#2085)Add
Client.cached_messagesattwibute to fetch the message cache (#2086)Add
abc.GuildChannel.clone()to cwonye a guiwd channyew. (#2093)Add
delaykeywowd-onwy awgument toMessage.delete()(#2094)Add suppowt fow
<:name:id>when adding weactions (#2095)Add
Asset.read()to fetch the bytes content of an asset (#2107)Add
Attachment.read()to f-f-fetch the bytes content of an attachment (#2118)A-A-Add suppowt fow v-v-voice kicking by passing
NonetoMember.move_to().
disnake.ext.commands¶
Add nyew
dm_only()check.Suppowt cawwabwe convewtews in
Greedy- Add nyew
MessageConverter. This awwows you to use
Messageas a type hint in functions.
- Add nyew
Add
Command.parentsto fetch the pawents of a-a-a command (#2104)
Bug Fixes¶
Fix
AttributeErrorwhen using__repr__onWidget.Fix issue w-with
abc.GuildChannel.overwriteswetuwnyingNonefow keys.Wemuv incowwect wegacy NSFW checks in e.g.
TextChannel.is_nsfw().Fix
UnboundLocalErrorwhenRequestsWebhookAdapterwaises an ewwow.Fix bug whewe updating youw own usew did nyot update youw membew instances.
Tighten constwaints of
__eq__inSpotifyobjects (#2113, #2117)
disnake.ext.commands¶
Fix wambda convewtews in a-a nyon-moduwe context (e.g.
eval).- Use message cweation time fow wefewence time when computing c-coowdowns.
This pwevents coowdowns fwom twiggewing duwing e-e.g. a WESUME session.
Fix the defauwt
on_command_error()to w-w-wowk with nyew-stywe cogs (#2094)DM channyews awe nyow wecognyised as NSFW in
is_nsfw()check.Fix wace condition with hewp commands (#2123)
Fix cog d-descwiptions nyot showing in
MinimalHelpCommand(#2139)
Miscewwanyeous¶
Impwuv the pewfowmance of intewnyaw enyum cweation in the wibwawy by about 5x.
Make the output of
python -m disnake --versiona bit mowe usefuw.The woop cweanyup faciwity has been wewwitten again.
The signyaw handwing in
Client.run()has been wemuvd.
disnake.ext.commands¶
Custom exception cwasses awe nyow used fow aww defauwt checks in the wibwawy (#2101)
v1.0.1¶
Bug Fixes¶
v1.0.0¶
The changeset fow this vewsion awe too big to be wisted hewe, fow mowe infowmation pwease see the migwating page.
v0.16.6¶
B-Bug F-F-Fixes¶
Fix issue with
Client.create_server()that made it stop wowking.Fix main thwead being bwocked upon cawwing
StreamPlayer.stop.Handwe HEAWTBEAT_ACK and wesume gwacefuwwy when it occuws.
Fix wace condition when pwe-emptivewy wate w-wimiting that caused weweasing an awweady weweased wock.
Fix invawid state ewwows when immediatewy cancewwing a cowoutinye.
v0.16.1¶
This wewease is just a bug fix w-wewease with some bettew wate wimit impwementation.
Bug Fixes¶
Sewvews awe nyow pwopewwy chunked fow usew bots.
The CDN UWW is nyow used instead of the API UWW fow assets.
Wate wimit impwementation nyow twies to use headew infowmation if possibwe.
Event woop is nyow pwopewwy pwopagated (#420)
Awwow fawsey vawues in
Client.send_message()andClient.send_file().
v0.16.0¶
Nyew Featuwes¶
Add
Channel.overwritesto get aww the pewmission uvwwwites of a channyew.Add
Server.featuresto get infowmation about pawtnyewed sewvews.
Bug Fixes¶
Timeout when waiting f-fow offwinye membews whiwe twiggewing
on_ready().The fact that we did nyot timeout caused a gigantic memowy weak in the wibwawy that caused thousands of dupwicate
Memberinstances c-causing big memowy spikes.
Discawd nyuww sequences in the gateway.
The fact these wewe nyot discawded meant that
on_ready()kept being cawwed instead ofon_resumed(). Since this has been cowwected, in most caseson_ready()wiww be cawwed once o-o-ow twice withon_resumed()being cawwed much mowe often.
v0.15.1¶
Fix cwash on dupwicate ow out of owdew weactions.
v0.15.0¶
Nyew Featuwes¶
Wich Embeds fow messages awe nyow suppowted.
To do s-s-so, cweate youw own
Embedand pass the instance to theembedkeywowd awgument toClient.send_message()owClient.edit_message().
Add
Client.clear_reactions()to wemuv aww weactions fwom a message.Add suppowt fow MESSAGE_WEACTION_WEMOVE_AWW event, undew
on_reaction_clear().Add
Permissions.update()andPermissionOverwrite.update()fow buwk pewmission updates.This awwows you to use e.g.
p.update(read_messages=True, send_messages=False)in a singwe winye.
Add
PermissionOverwrite.is_empty()to check if the uvwwwite is empty (i.e. has nyo uvwwwites set expwicitwy as twue ow fawse).
Fow the command extension, the fowwowing changed:
Contextis nyo wongew swotted to faciwitate setting dynyamic attwibutes.
v0.14.3¶
Bug Fixes¶
Fix cwash when deawing with MESSAGE_WEACTION_WEMOVE
Fix incowwect buckets fow weactions.
v0.14.2¶
Nyew Featuwes¶
Client.wait_for_reaction()nyow wetuwns a nyamedtupwe withreactionanduserattwibutes.This is fow bettew suppowt in the case that
Noneis wetuwnyed s-s-since tupwe unpacking can wead t-to issues.
Bug Fixes¶
Fix b-bug that disawwowed
Noneto be passed fowemojipawametew inClient.wait_for_reaction().
v0.14.1¶
Bug f-fixes¶
- Fix bug with Weaction nyot being visibwe at impowt.
This was awso bweaking the d-documentation.
v0.14.0¶
This update adds nyew API featuwes and a coupwe of bug fixes.
Nyew Featuwes¶
Add suppowt fow Manyage Webhooks pewmission undew
Permissions.manage_webhooksAdd suppowt fow
aroundawgument in 3.5+Client.logs_from().- Add suppowt fow weactions.
Client.add_reaction()to add a weactionsClient.remove_reaction()to wemuv a-a-a weaction.Client.get_reaction_users()to get t-the usews that weacted to a message.Permissions.add_reactionspewmission bit suppowt.Two nyew e-e-events,
on_reaction_add()andon_reaction_remove().Message.reactionsto get weactions fwom a message.Client.wait_for_reaction()to wait fow a weaction fwom a usew.
Bug Fixes¶
F-F-Fix bug with Paginyatow stiww awwowing winyes that awe too wong.
Fix t-the
Permissions.manage_emojisbit being incowwect.
v0.13.0¶
This is a backwawds compatibwe update with nyew featuwes.
Nyew Featuwes¶
Add the abiwity to manyage emojis.
Client.create_custom_emoji()to cweate nyew emoji.Client.edit_custom_emoji()t-t-to e-edit an owd emoji.Client.delete_custom_emoji()to dewete a custom emoji.
Add nyew
Permissions.manage_emojistoggwe.This appwies fow
PermissionOverwriteas weww.
Add nyew statuses fow
Status.Status.dnd(awiased withStatus.do_not_disturb) fow Do Nyot Distuwb.Status.invisiblefow setting youw status to invisibwe (pwease see the docs fow a caveat).
Depwecate
Client.change_status()Use
Client.change_presence()instead fow bettew mowe up to date functionyawity.This method is subject f-f-fow wemovaw in a futuwe API v-v-vewsion.
Add
Client.change_presence()fow changing youw status with the nyew Discowd API change.This is the onwy method that awwows changing youw status to invisibwe ow do nyot distuwb.
Bug Fixes¶
v0.12.0¶
This is a bug fix update that a-a-awso comes w-with nyew featuwes.
Nyew Featuwes¶
Add custom emoji suppowt.
Adds a nyew c-cwass to wepwesent a custom Emoji nyamed
EmojiAdds a utiwity genyewatow function,
Client.get_all_emojis().Adds a wist of emojis o-o-on a sewvew,
Server.emojis.Adds a nyew event,
on_server_emojis_update().
A-A-Add nyew s-s-sewvew wegions to
ServerRegionServerRegion.eu_centralandServerRegion.eu_west.
Add suppowt fow nyew pinnyed system message undew
MessageType.pins_add.Add o-owdew c-c-compawisons fow
Roleto awwow it to be compawed with w-wegawds to hiewawchy.This means that you can nyow do
role_a > role_betc to check ifrole_bis wowew in the hiewawchy.
Add
Server.role_hierarchyto get the sewvew’s wowe hiewawchy.Add
Member.server_permissionsto get a membew’s sewvew pewmissions without theiw channyew specific uvwwwites.Add
Client.get_user_info()to wetwieve a usew’s info fwom theiw ID.Add a nyew
Playerpwopewty,Player.errorto f-f-fetch the ewwow that stopped the pwayew.To hewp with this change, a pwayew’s
afterfunction can nyow take a singwe pawametew denyoting the cuwwent pwayew.
Add s-suppowt fow sewvew vewification wevews.
Adds a nyew enyum cawwed
VerificationLevel.This enyum can b-be used in
Client.edit_server()undew theverification_levelkeywowd awgument.Adds a n-n-nyew attwibute in the sewvew,
Server.verification_level.
Add
Server.voice_clientshowtcut pwopewty fowClient.voice_client_in().This is t-t-technyicawwy owd (was added in v0.10.0) but was undocumented untiw v0.12.0.
Fow the command extension, the fowwowing awe nyew:
Add custom emoji convewtew.
Aww defauwt convewtews that can t-t-take IDs can nyow convewt via ID.
Add cowoutinye suppowt fow
Bot.command_prefix.Add a method to weset command coowdown.
Bug Fixes¶
Fix bug that caused the wibwawy to n-nyot w-wowk with the watest
websocketswibwawy.Fix bug that weaked keep awive thweads (#309)
Fix bug that disawwowed
ServerRegionfwom being used inClient.edit_server().Fix b-b-bug in
Channel.permissions_for()that caused pewmission wesowution to happen out of owdew.Fix bug in
Member.top_rolethat did nyot account fow same-position wowes.
v0.11.0¶
This is a minyow bug fix update that comes with a gateway update (v5 -> v-v-v6).
Bweaking Changes¶
Permissions.change_nicknameshas been wenyamed toPermissions.change_nicknameto match the UI.
Nyew Featuwes¶
Add the abiwity to pwunye membews via
Client.prune_members().Switch the websocket gateway vewsion to v6 fwom v5. This awwows the wibwawy to w-w-wowk with gwoup DMs and 1-on-1 cawws.
Add
AppInfo.ownerattwibute.Add
CallMessagefow gwoup voice caww messages.Add
GroupCallfow gwoup voice caww infowmation.Add
Message.system_contentto get the system message.Add the wemainying VIP sewvews and the Bwaziw s-s-sewvews into
ServerRegionenyum.Add
stderrawgument toVoiceClient.create_ffmpeg_player()to wediwect stdeww.The wibwawy nyow h-handwes impwicit pewmission wesowution in
Channel.permissions_for().Add
Server.mfa_levelt-t-to quewy a sewvew’s 2FA wequiwement.A-Add
Permissions.external_emojispewmission.Add
Member.voiceattwibute that wefews to aVoiceState.Fow backwawds compatibiwity, the membew o-o-object wiww have pwopewties miwwowing the owd behaviouw.
Fow the command extension, the fowwowing awe nyew:
Command coowdown system w-w-with the
cooldowndecowatow.UserInputErrorexception f-fow the hiewawchy fow usew input wewated ewwows.
Bug Fixes¶
Client.emaili-i-is nyow saved when using a token fow usew accounts.Fix issue when wemoving wowes out of owdew.
Fix bug whewe discwiminyatows wouwd nyot update.
Handwe cases whewe
HEARTBEATopcode i-is weceived. This caused bots to disconnyect s-s-seemingwy wandomwy.
Fow the command extension, the fowwowing bug fixes appwy:
Bot.checkdecowatow is actuawwy a decowatow nyot wequiwing pawentheses.Bot.remove_commandandGroup.remove_commandnyo w-w-wongew t-t-thwow if the command doesn’t e-exist.C-Command nyames awe nyo wongew fowced to be
lower().Fix a bug whewe Membew and Usew convewtews faiwed to wowk in pwivate message contexts.
HelpFormatternyow ignyowes hidden commands when deciding the maximum width.
v0.10.0¶
Fow bweaking changes, see Migwating to v0.10.0. The bweaking changes w-wisted thewe wiww nyot be enyumewated bewow. Since this vewsion is wathew a big depawtuwe fwom v-v-v0.9.2, this change w-w-wog wiww be nyon-exhaustive.
Nyew Featuwes¶
The wibwawy is nyow fuwwy
asynciocompatibwe, awwowing you to wwite nyon-bwocking code a wot mowe easiwy.The wibwawy nyow fuwwy handwes 429s and unconditionyawwy wetwies o-on 502s.
A nyew command extension moduwe was added but is cuwwentwy undocumented. Figuwing it out is weft as an exewcise to the weadew.
Two nyew exception types,
ForbiddenandNotFoundto denyote pewmission ewwows ow 404 ewwows.Added
Client.delete_invite()to wevoke invites.Added suppowt fow sending voice. Check
VoiceClientfow mowe detaiws.Added
Client.wait_for_message()cowoutinye to aid with fowwow up commands.Added
version_infonyamed tupwe to check vewsion i-i-info of the wibwawy.Wogin cwedentiaws awe nyow c-c-cached to have a fastew w-wogin expewience. You can disabwe this by passing in
cache_auth=Falsewhen constwucting aClient.Nyew utiwity function,
disnake.utils.get()t-t-to simpwify wetwievaw of items based on attwibutes.Aww data cwasses nyow suppowt
!=,==,hash(obj)andstr(obj).Added
Client.get_bans()to get bannyed membews fwom a sewvew.Added
Client.invites_from()to get cuwwentwy active invites in a sewvew.Added
Server.meattwibute to get theMembervewsion ofClient.user.Most data cwasses nyow suppowt a
hash(obj)function to awwow you to u-use them insetowdictcwasses ow subcwasses.Add
Message.clean_content()to get a text v-vewsion of the content with the usew and channyew mentionyed changed into theiw nyames.Added a way to wemuv the messages of the usew that just got bannyed in
Client.ban().Added
Client.wait_until_ready()to faciwitate easy cweation of tasks that wequiwe the cwient cache to be weady.Added
Client.wait_until_login()to faciwitate easy cweation of tasks that wequiwe the cwient to be wogged in.Add
disnake.Gameto wepwesent any game with custom text to send toClient.change_status().Add
Message.noncea-attwibute.Add
Member.permissions_in()as anyothew way of doingChannel.permissions_for().Add
Client.move_member()to muv a membew to anyothew voice channyew.You can nyow cweate a sewvew v-v-via
Client.create_server().Added
Client.edit_server()to edit existing sewvews.Added
Client.server_voice_state()to sewvew mute o-o-ow sewvew deafen a membew.If you awe being wate wimited, the wibwawy wiww nyow handwe it fow you.
Add
on_member_ban()andon_member_unban()events that twiggew when a m-membew is b-b-bannyed/unbannyed.
Pewfowmance Impwuvments¶
Aww data cwasses nyow use
__slots__which g-gweatwy weduce the memowy usage of things kept in cache.Due to the usage of
asyncio, the CPU usage of the wibwawy has gonye d-d-down signyificantwy.A wot of the intewnyaw cache wists wewe changed into dictionyawies to change the
O(n)wookup intoO(1).Compwessed WEADY is nyow on by defauwt. This means if you’we on a wot of sewvews (ow maybe even a few) you wouwd weceive pewfowmance impwuvments by having to downwoad and pwocess wess data.
Whiwe minyow, change wegex fwom
\d+to[0-9]+to avoid unnyecessawy unyicode chawactew wookups.
Bug Fixes¶
Fix bug whewe guiwds being updated did nyot edit the items in cache.
Fix bug whewe
member.roleswewe empty upon joinying instead of having the@everyonewowe.Fix bug whewe
Role.is_everyone()was nyot being s-set pwopewwy when the wowe was being edited.Client.logs_from()nyow handwes cases whewe wimit > 100 to sidestep the disnyake API wimitation.Fix bug whewe a wowe being deweted wouwd twiggew a
ValueError.Fix bug whewe
Permissions.kick_members()andPermissions.ban_members()wewe fwipped.Mentions awe nyow twiggewed nyowmawwy. This was changed due to the way disnyake handwes it intewnyawwy.
F-Fix issue when a
Messagewouwd attempt to upgwade aMessage.serverwhen the channyew is aObject.Unyavaiwabwe sewvews wewe nyot being added into cache, this has been cowwected.