Changelog¶
This page keeps a detailed human friendly rendering of what’s new and changed in specific versions.
v2.1.0¶
Due to the enormous amount of changes in this release, some minor changes may be omitted from this changelog. Please refer to the documentation for more details on specific features.
New Features¶
Add new flags to
ApplicationFlags,PublicUserFlags,MessageFlags,MemberFlags,ChannelFlags, and moreSupport new
MessageTypevalues, updateMessage.system_contentaccordinglySupport new
ConnectionTypevalues- Overhaul rich presence, adding support for viewing and sending all activity fields (including many new fields)
New activity type:
ActivityType.hang, supported viaHangActivityNew classes:
ActivityParty,ActivityAssets,ActivitySecrets, andActivityTimestampsMade
Spotifyconstructible and sendable viaClient.change_presence()Add
Client.proxy_external_application_assets()to proxy external assets for rich presence
- Support read states
New low-level interface:
ReadStateAccess all read states from
Client.read_statesand access per-channel read states via theTextChannel.read_stateattributeAdd rich attributes:
TextChannel.acked_message_id,TextChannel.acked_message,TextChannel.acked_pin_timestamp,TextChannel.mention_count, andTextChannel.last_viewed_timestampAdd
abc.Messageable.unack()to unacknowledge all messages in a channelAdd
Client.bulk_ack()to acknowledge multiple read states at once
- Support experiments
Add
UserExperimentandGuildExperimentAccess user experiments via
Client.experimentsand guild experiments viaClient.guild_experimentsAdd
Client.get_experiment()helper andClient.fetch_experiments()coroutine
- Add message search functionality
Search guilds with
Guild.search()Search channels with
abc.Messageable.search()
- Add support for the new username system (also known as “pomelo”)
Add
User.is_pomelo()to check if a user has been migratedAdd
User.global_nameto get their global nickname or “display name”Update
User.display_nameandMember.display_nameto understand global nicknamesUpdate
__str__forUserto drop discriminators if the user has been migratedUpdate
Guild.get_member_named()to work with migrated usersUpdate
User.default_avatarto work with migrated usersUpdate
ClientUser.edit()to allow migrating and changing global names[ext.commands] Update user and member converters to understand migrated users
- Add GCP uploads
Allows pre-uploading files to Google Cloud Storage for faster file sending
Supports uploading in parallel and allows reusing previously uploaded files
Allows sending files up to 500 MiB each (Nitro only)
Implemented via
CloudFileandabc.Messageable.upload_files()The
CloudFileinstances can be used in place ofFileinstances when sending messages
- Support application command fetching V3
Add
abc.Messageable.application_commands()andGuild.application_commands()to get all application commands in a guild or private channelAlias and deprecate all old application command fetching methods
It is highly recommended that the result of this method is cached to avoid rate limits
- Support hubs
Add
DirectoryChannel,DirectoryEntry, and relevant methods for fetching and creatingAdd
Guild.hub_typeAdd
Client.join_hub_waitlist(),Client.lookup_hubs(), andClient.join_hub()
- Support friend suggestions
Add new events,
on_friend_suggestion_add()andon_friend_suggestion_remove()
- Support OAuth2 authorizations
- Heavily improve guild subscriptions
[BREAKING] Remove
Guild.requestmethod; useGuild.subscribe()insteadAllow disabling auto guild subscription via
guild_subscriptionsparameter inClientAdd
Guild.is_subscribed()andGuild.is_subscribed_to()to check if the client is subscribed to a guildAdd
Guild.subscribe()andGuild.subscribe_to()to allow manually managing guild subscriptions
- [BREAKING] User notes handling is now entirely rewritten
The
UserNoteclass is removed; notes are now represented as stringsClient.notesis renamed toClient.fetch_notes()for forward-compatibility
- Update various payment and billing related models to add new fields
[BREAKING] Remove
Payment.refundas it is no longer supported by the APIAdd
BRAINTREE_KEY,STRIPE_KEY, andADYEN_KEYto package exports
Add
message_send_cooldownandthread_create_cooldownattributes to theabc.Messageable.typing()context manager.Add
Client.channel_affinities()to get channel affinities andClient.premium_affinities()to get premium user affinitiesAdd various new fields to
ApplicationandPartialApplication, update implementations to match APIAllow passing
activities,afk, andidle_sincetoClientfor initial presence setupAdd
Client.is_afk()andClient.idle_sincehelpers- Allow passing
preferred_rtc_regionstoClientto override Discord’s suggested RTC regions [BREAKING] Rename
Client.preferred_voice_regionstoClient.preferred_rtc_regionsto match the API[BREAKING] Rename
Client.fetch_preferred_voice_regionstoClient.fetch_preferred_rtc_regions()to match the API[BREAKING] Remove
preferred_regionfromClient.change_voice_state()andGuild.change_voice_state()Allow setting the
Client.preferred_rtc_regionsproperty after initialisation
- Allow passing
Allow passing
canarytoClientto use the canary APIAllow passing
timezonetoClientto configure the timezone broadcasted to DiscordAdd
TutorialandClient.tutorialto access new user tutorial informationAdd
with_permissionstoClient.fetch_invite()Add
Client.create_invite()andClient.revoke_invites()to create and revoke friend invitesAllow
Client.create_group()to create a group channel with only one other recipient[BREAKING] Rename
Client.relationship_activity_statisticstoClient.global_activity_statistics()to better reflect its purposeAdd
Client.user_offer()to replace deprecatedClient.trial_offer()Add
Client.report_unverified_application()to report game detection issuesAdd
Client.recent_avatars()to get recently used avatarsAdd
Guild.query_recent_members()to fetch members who recently joined- Add various new fields to
UserProfileandMemberProfile Note that nearly all fields are unavailable if the user has blocked the client user. This can be determined with
UserProfile.is_blocker()
- Add various new fields to
Add
DefaultAvatar.pinkfor new pink default avatarsAdd
Colour.pink()to get the pink default avatar colour- Add support for voice messages (GH-9358)
This does not support sending voice messages yet
Add support for
TextChannel.default_thread_slowmode_delayAdd support for
ForumChannel.default_sort_orderAdd support for
default_reaction_emojianddefault_forum_layoutinGuild.create_forum()Add support for
widget_channel,widget_enabled, andmfa_levelinGuild.edit()Add various new
Permissionsand changesAdd support for
with_countsparameter toClient.fetch_guilds()Add new
Guild.get_emoji()helperAdd
Guild.max_stage_video_channel_usersandGuild.safety_alerts_channelAdd support for
raid_alerts_disabledandsafety_alerts_channelinGuild.edit().- Add support for Polls (GH-9759).
Polls can be created using
Polland thepollkeyword-only parameter in various message sending methodsAdd
PollAnswerandPollMediaAdd
Message.end_poll()method to end pollsAdd new events,
on_poll_vote_add(),on_poll_vote_remove(),on_raw_poll_vote_add(), andon_raw_poll_vote_remove()
Voice handling has been completely rewritten to fix many bugs
Add support for
RawReactionActionEvent.message_author_idAdd support for
AuditLogAction.creator_monetization_request_createdandAuditLogAction.creator_monetization_terms_acceptedAdd support for
AttachmentFlags, accessed viaAttachment.flagsAdd support for
RoleFlags, accessed viaRole.flagsAdd support for
ChannelType.media, accessed viaForumChannel.is_media()Add shortcut for
CategoryChannel.forums.Add encoder options to
VoiceClient.play()Add optional attribute
integration_typeinAuditLogEntry.extraforkickormember_role_updateactions- Add support for reading burst reactions
Add
scheduled_eventparameter forStageChannel.create_instance()- Add support for auto mod members
Add
typekeyword argument toAutoModRuleAction
- Add support for getting/fetching threads from
Message
- Add support for getting/fetching threads from
Add support for adding forum thread tags via webhook
Add support for setting voice channel status
- Add support for guild incidents
Updated
Guild.edit()withinvites_disabled_untilanddms_disabled_untilparameters
Add support for
abc.User.avatar_decorationAdd support for GIF stickers
Add support for bulk banning members via
Guild.bulk_ban()Add
reasonkeyword argument toThread.delete()Add support for reaction types to raw and non-raw models
- Add support for message forwarding
Adds
MessageReferenceTypeAdds
MessageSnapshotAdds
typeparameter toMessageReference,MessageReference.from_message(), andPartialMessage.to_reference()Add
PartialMessage.forward`ionCallbackResponse.resource()will be different
Add
PartialWebhookChannel.mentionattributeAdd richer
Role.move()interfaceAdd support for
EmbedFlagsviaEmbed.flagsAdd
ForumChannel.membersproperty- Add support for purchase notification messages
Add new type
MessageType.purchase_notificationAdd new models
GuildProductPurchaseandPurchaseNotification
Add
categoryparameter toabc.GuildChannel.clone()- Parse full message for message edit event
Adds
RawMessageUpdateEvent.messageattributePotentially speeds up
on_message_edit()by no longer copying data
Allow passing
Noneforscopesparameter inutils.oauth_url()Add
Guild.dm_spam_detected_atandGuild.is_dm_spam_detected()Add new
Attachmentfields- Add support for guild tags (also known as primary guilds)
This is through the
PrimaryGuildclassYou retrieve this via
Member.primary_guild
- Add support for the new pins endpoint
This turns
abc.Messageable.pins()into an async iteratorThe old eager behaviour of using
awaitis still supported, but is now deprecated
- Add support for guild onboarding
Completing onboarding is still not supported
Add support new gradient and holographic role colours
Add
Locale.language_codeattributeAdd support for guest invites
Add
File.urito get theattachment://<filename>URI of a fileAdd ability to create a media-only forum channel via
mediaparameter inGuild.create_forum()- Add new colours from the new Discord themes
This updates the old
Colour.dark_theme(),Colour.light_theme(),Colour.light_embed()andColour.dark_embed()This adds
Colour.ash_theme(),Colour.ash_embed(),Colour.onyx_theme(), andColour.onyx_embed()
[ext.tasks] Add
nameparameter toloop()to name the internalasyncio.Task[ext.commands] Add fallback behaviour to
CurrentGuild[ext.commands] Add logging for errors that occur during
cog_unload()[ext.commands] Add support for
typing.NewTypeandtypekeyword type aliases[ext.commands] Add support for positional-only flag parameters
[ext.commands] Add support for channel URLs in ChannelConverter related classes
[ext.commands] Add
BadLiteralArgument.argumentto get the failed argument’s value[ext.commands] Add
Context.filesize_limitproperty[ext.commands] Add support for
Parameter.displayed_name
Bug Fixes¶
Fix TLS fingerprinting issues causing unnecessary CAPTCHA challenges and blocked requests
Fix the type of
ClientUser.phoneto be a stringFix various state issues when managing guild subscriptions
[BREAKING] Remove no longer functional
validateparameter fromabc.GuildChannel.create_invite()Improve presence syncing to reduce unnecessary updates and lost presences
[BREAKING] Update return type of
Client.detectable_applications()to fix a crash due to an API change[BREAKING] Remove nonexistant
Gift.revokedattribute[BREAKING] Rename
Guild.owner_application_idtoGuild.application_idto match API and upstream[BREAKING] Remove no longer functional
Guild.application_command_countsattributeFix crash in
Integrationwith the Twitch integration ID being a stringImprove member and relationship presence support and handling
- Fix
FileHandlerhandlers being written ANSI characters when the bot is executed inside PyCharm This has the side effect of removing coloured logs from the PyCharm terminal due an upstream bug involving TTY detection. This issue is tracked under PY-43798
- Fix
Fix channel edits with
Webhook.edit()sending two requests instead of oneFix
StageChannel.last_message_idalways beingNoneFix piped audio input ending prematurely
Fix AutoMod audit log entry error due to empty
channel_idFix handling of
aroundparameter inabc.Messageable.history()Fix
utils.escape_markdown()not escaping the new markdownFix webhook targets not being converted in audit logs
Fix error when not passing
enabledinGuild.create_automod_rule()Fix how various parameters are handled in
Guild.create_scheduled_event()Fix not sending the
ssrcparameter when sending theSPEAKINGvoice payloadFix username lookup in
Guild.get_member_named()Fix false positives in
PartialEmoji.from_str()inappropriately settinganimatedtoTrueFix
NameErrorwhen usingabc.GuildChannel.create_invite()Fix escape behaviour for lists and headers in
escape_markdown()Fixes and improvements for
FFmpegAudioand all related subclassesFix
Template.source_guild()attempting to resolve from cacheFix
IndexErrorbeing raised instead ofValueErrorwhen callingColour.from_str()with an empty stringFix possible error in voice cleanup logic
Fix possible bad voice state where you move to a voice channel with missing permissions
Fix handling of
AuditLogDiffwhen relating to auto mod triggersFix race condition in voice logic relating to disconnect and connect
Fix restriction on auto moderation audit log ID range
Fix comparison between
Objectclasses with atypesetFix handling of an enum in
AutoModRule.edit()Fix handling of
Client.close()withinClient.__aexit__()Fix channel deletion not evicting related threads from cache
Fix bug with cache superfluously incrementing role positions
Fix
exempt_channelsnot being passed along inGuild.create_automod_rule()Fix
abc.GuildChannel.purge()failing if the message was deletedHandle improper 1000 close code closures by Discord
- Add support for AEAD XChaCha20 Poly1305 encryption model
This allows voice to continue working when the older encryption modes eventually get removed
Update all channel clone implementations to work as expected
Fix
TextChannel.clone()always sending slowmode when not applicable to news channelsFix
Sticker.urlfor GIF stickersFix
User.default_avatarfor team users and webhooksFix
AuditLogEntry.targetcausing errors forAuditLogAction.message_pinandAuditLogAction.message_unpinactionsFix path sanitisation for absolute Windows paths when using
__main__Create
ScheduledEventon cache miss foron_scheduled_event_delete()Add defaults for
Messagecreation preventing some crashesFix voice connection issues and upgrade the voice version to 8
Fix calculation of hashed rate limit keys
Fix
Thread.applied_tagsbeing empty for media channelsFix potentially stuck ratelimit buckets in certain circumstances
Fix audit log
automod_rule_trigger_typeextra being missing[ext.tasks] Fix race condition when setting timer handle when using uvloop
[ext.commands] Fix issue with category cooldowns outside of guild channels
[ext.commands] Fix callable FlagConverter defaults on hybrid commands not being called
[ext.commands] Unwrap
Parameterif given as default toparameter()[ext.commands] Fix fallback behaviour not being respected when calling replace for
Parameter[ext.commands] Fix
HelpCommanddefined checks not carrying over during copy[ext.commands] Fix the wrong
on_help_command_error()being called when ejected from a cog[ext.commands] Fix
=Nonebeing displayed insignature[ext.commands] Change lookup order for
MemberConverterandUserConverterto prioritise usernames instead of nicknames
Miscellaneous¶
Minimum version is now Python 3.10
New dependency:
curl_cffiUpdate filesize limit constants
Additional documentation added for logging capabilities
Performance increases of constructing
Permissionsusing keyword argumentsImprove
__repr__ofSyncWebhookandWebhookChange internal thread names to be consistent
Use a fallback package for
audioopto allow the library to work in Python 3.13 or newerRemove
aiodnsfrom being used on Windows- Add zstd gateway compression to
speedextras This can be installed using
discord.py-self[speed]
- Add zstd gateway compression to
Add proxy support fetching from the CDN
Remove
/from being safe from URI encoding when constructing paths internallySanitize invite argument before calling the invite info endpoint
Avoid returning in finally in specific places to prevent exception swallowing
Deprecate the
with_expirationparameter inClient.fetch_invite()Allow creating NSFW voice/stage channels
The
Inviteis now returned when usingInvite.delete()orClient.delete_invite()Update PyNaCl minimum version dependency
AppCommandTypeis nowApplicationCommandTypefor consistency; the old name is still available as an aliasAppCommandOptionTypeis nowApplicationCommandOptionTypefor consistency; the old name is still available as an alias[BREAKING] Remove all achievement support as the endpoints have been removed by Discord
- [BREAKING] Updated CAPTCHA handler implementation
The old
CaptchaHandlerclass has been removedNew interface is via the
captcha_handlerparameter inClient, which accepts aCaptchaRequiredclass instance and theClientitself as parametersYou can also override
Client.handle_captcha()in a subclass
[BREAKING] Swap all
exclude_*parameters in fetch methods toinclude_*parameters for consistency
v2.0.0¶
This is considered the initial stable version. All previous versions were mostly a stepping stone to this one. The changes are too enormous to list here, so please check out the rest of the documentation.