NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1794 most downloaded on PyPI
A Python wrapper for the Discord API
Last release 7 months ago
03 Mar 2026
Release timing varies
gaps range from 2 weeks to 11 months
Most releases are documented
notes for 49 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
88 releases · first in 2015
Fix aiohttp deprecation warning for websocket timeouts (10418)
Fix memory leak when using ui.LayoutView and removing items but those items not being removed from internal cache.
Fix aiohttp deprecation warning for websocket timeouts (10418)
Show davey dependency output in python -m discord --version to debug DAVE issues
Raise an error and warn when davey is not installed and using voice
Change how views are bound to the internal cache when using interactions
Add DAVE protocol support for voice connections (10300)
Add DAVE protocol support for voice connections (10300)
CheckboxGroupComponent corresponds to ui.CheckboxGroup
CheckboxComponent corresponds to ui.Checkbox
RadioGroupComponent corresponds to ui.RadioGroup
CheckboxGroupOption and RadioGroupOption allow creating these options
This is accessible via app_commands.Timestamp and ext.commands.Timestamp as an annotation
Permissions.bypass_slowmode (10350)
Permissions.set_voice_channel_status (10279)
Permissions.pin_messages
Add client parameter to PartialEmoji.from_str (10407)
Add support for user collectibles accessible via User.collectibles and Member.collectibles (10277)
Add Message.is_forwardable to check if a message can be forwarded (10353)
Add support for getting an integration's scopes (10352)
Add Interaction.command_id and Interaction.custom_id helpers (10321)
Support new fields in Member.edit (10303)
Add support for getting role member counts via Guild.role_member_counts
Add MessageType.is_deletable
Add reason keyword argument to Client.delete_invite (10318, 10340)
Add silent parameter to ForumChannel.create_thread (10304)
Add support for MessageType.emoji_added (10284)
Add channel attribute to automod quarantine user AuditLogAction (10274)
Fix FFmpeg errors not sent to after callback (10387)
Fix Webhook.edit_message missing the view parameter (10395, 10398)
Fix TextChannel.purge failing when encountering certain system messages
Fix Message.call raising an attribute error when accessed (10404)
Fix certain component IDs not being able to be settable afterwards
Fix ui.Modal not raising when hitting the 5 item limit
Fix ui.Item.row not being set appropriately when used in a ui.Modal (10397)
Fix compression.zstd not working as expected when Discord does not send encoding information (10344)
Fix rare bug where Client.latency was incorrect due to not updating heartbeat state
Fix overzealous exporting of symbols within an internal primary_guild module (10295)
Close websocket when reconnecting websocket during polling (10409)
Use ui.View.walk_children when removing items from the view cache (10402)
|commands| Fix flag annotations not working under Python 3.14
|commands| Fix decorator order mattering for hybrid commands
|commands| Fix ~ext.commands.Context.from_interaction derived Message.type being incorrect
Allow ui.View initialization without a running event loop (10367)
Optimise utils.find and specialise utils.as_chunks (10351)
Detach ui.Item.view when the item is removed (10348)
Change description to be optional when creating emoji (10346)
Don't assume Python 3.14 always has compression.zstd (10328)
Use webp as the default emoji URL format
|tasks| Log handled exceptions before sleeping
One column per quarter.
Fix InviteType and ReactionType not being exported (10310)
Fix InviteType and ReactionType not being exported (10310)
Fix ui.Modal submits not working for components without a custom_id (10307)
Fix required keyword argument missing in most ui.Select classes (10307)
Fix incorrect handling of ui.Modal submit data when using selects (10307)
Fix potential exception when assigning ui.Container.children
Fix ui.Section.accessory setter not updating internal state leading to an exception
Use compression.zstd from the standard library if available on Python 3.14 (10323)
Fix ui.Select.required not being applied properly
Fix ui.Select.required not being applied properly
Fix potential attribute error when accessing LabelComponent
Fix issue when stacking decorators such as app_commands.guild_install and app_commands.user_install
Fix a bug with ui.DynamicItem causing it to fail at runtime when passing a generic.
Fix a bug with ui.DynamicItem causing it to fail at runtime when passing a generic.
Fix ui.Section.children and ui.Section.accessory having None as the Item.parent (10269)
Fix ui.Section.children and ui.Section.accessory having None as the Item.parent (10269)
Fix error when using a ui.DynamicItem inside an ui.Section
Fix ui.DynamicItem not working when set as an ui.Section.acessory (10271)
Fix ui.LayoutView.total_children_count being inaccurate when adding nested items
Fix crash when accessing AuditLogEntry.category for unknown audit log actions
|tasks| Add logging statement when a handled exception occurs (10276)
This changes discord.ui.TextInput.label to be optional and is deprecated over discord.ui.Label.
A new ui.LayoutView is used to use these components which requires manual layouting.
Backwards compatibility is maintained with everything, including ui.DynamicItem.
SectionComponent corresponds to ui.Section
TextDisplay corresponds to ui.TextDisplay
ThumbnailComponent corresponds to ui.Thumbnail
MediaGalleryComponent corresponds to ui.MediaGallery
FileComponent corresponds to ui.File
SeparatorComponent corresponds to ui.Separator
Container corresponds to ui.Container
ActionRow corresponds to ui.ActionRow
This allows discord.ui.Select within modals
This also allows discord.ui.Label for better control of the forms within modals.
This changes discord.ui.TextInput.label to be optional and is deprecated over discord.ui.Label.
As of this writing, this Discord update is not available to users yet.
This is through the PrimaryGuild class.
You retrieve this via Member.primary_guild.
This turns abc.Messageable.pins into an async iterator.
The old eager behaviour of using await is still supported, but is now deprecated.
Add support for guild onboarding (10226, 9260)
Add support for MemberFlags.automod_quarantined_guild_tag (10236)
Add support new gradient and holographic role colours (10214, 10225)
Add Locale.language_code attribute (10222)
Add support for guest invites (10220)
Add File.uri to get the attachment://<filename> URI of a file
Add support for InteractionResponse.launch_activity responses (10193)
Add ability to create a media-only forum channel via media parameter in Guild.create_forum (10170)
Add Interaction.filesize_limit (10159)
This updates the old Colour.dark_theme, Colour.light_theme, Colour.light_embed and Colour.dark_embed
This adds Colour.ash_theme, Colour.ash_embed, Colour.onyx_theme, and Colour.onyx_embed
Adds the new StatusDisplayType enum
Add Permissions.apps classmethod category (10147)
Add more attributes to app_commands.AppCommandThread and app_commands.AppCommandChannel (10180, 10252)
Fix context install decorators to explicitly restrict commands
Fix error when sending non-interactive views via partial webhooks (10235)
Fix voice connection issues and upgrade the voice version to 8 (10210)
Fix calculation of hashed rate limit keys (10215)
Fix Thread.applied_tags being empty for media channels (10178)
Fix Embed.to_dict for user-inherited Embed classes (10173)
Fix potentially stuck ratelimit buckets in certain circumstances (10160)
Fix __bool__ being incorrect for Embed (10154)
Fix audit log automod_rule_trigger_type extra being missing (10244)
Properly transform media channels in app commands (10177)
|commands| Fix certain converters not working under Optional type hint in hybrids (10239, 10245)
Skip GUILD_MEMBER_ADD if the member is already cached (10238)
Deprecate various methods involving guild creation (10164, 10246)
Deprecate the with_expiration parameter in Client.fetch_invite (10259)
Allow creating NSFW voice/stage channels (10200)
The Invite is now returned when using Invite.delete or Client.delete_invite (10181)
Copy Select options when creating View class (10143)
Update PyNaCl minimum version dependency (10127)
Fix a serialization issue when sending embeds (10126)
Fix a serialization issue when sending embeds (10126)
Fix InteractionCallbackResponse.resource having incorrect state (10107)
Fix InteractionCallbackResponse.resource having incorrect state (10107)
Create ScheduledEvent on cache miss for on_scheduled_event_delete (10113)
Add defaults for Message creation preventing some crashes (10115)
Fix Attachment.is_spoiler and Attachment.is_voice_message being incorrect (10122)
Add support for message forwarding (9950)
Adds MessageReferenceType
Adds MessageSnapshot
Adds type parameter to MessageReference, MessageReference.from_message, and PartialMessage.to_reference
Add PartialMessage.forward
Adds new events on_subscription_create, on_subscription_update, and on_subscription_delete
Add SubscriptionStatus enum
Add Subscription model
Add SKU.fetch_subscription and SKU.subscriptions
Add Client.create_application_emoji
Add Client.fetch_application_emoji
Add Client.fetch_application_emojis
Add Emoji.is_application_owned
Add BaseSoundboardSound, SoundboardDefaultSound, and SoundboardSound
Add VoiceChannelEffect
Add VoiceChannelEffectAnimation
Add VoiceChannelEffectAnimationType
Add VoiceChannelSoundEffect
Add VoiceChannel.send_sound
Add new audit log actions: AuditLogAction.soundboard_sound_create, AuditLogAction.soundboard_sound_update, and AuditLogAction.soundboard_sound_delete.
Add Intents.expressions and make Intents.emojis and Intents.emojis_and_stickers aliases of that intent.
Add new events: on_soundboard_sound_create, on_soundboard_sound_update, on_soundboard_sound_delete, and on_voice_channel_effect.
Client.soundboard_sounds
Guild.soundboard_sounds
Client.get_soundboard_sound
Guild.get_soundboard_sound
Client.fetch_soundboard_default_sounds
Guild.fetch_soundboard_sound
Guild.fetch_soundboard_sounds
Guild.create_soundboard_sound
Methods from InteractionResponse now return InteractionCallbackResponse
Depending on the interaction response type, InteractionCallbackResponse.resource will be different
Add PartialWebhookChannel.mention attribute (10101)
Add support for sending stateless views for SyncWebhook or webhooks with no state (10089)
Add richer Role.move interface (10100)
Add support for EmbedFlags via Embed.flags (10085)
Add new flags for AttachmentFlags (10085)
This requires setting the enable_raw_presences keyword argument within Client.
Add ForumChannel.members property. (10034)
Add exclude_deleted parameter to Client.entitlements (10027)
Add Client.fetch_guild_preview (9986)
Add AutoShardedClient.fetch_session_start_limits (10007)
Add PartialMessageable.mention (9988)
MessageInteractionMetadata.target_user
MessageInteractionMetadata.target_message_id
MessageInteractionMetadata.target_message
Add Message.forward flag (9978)
Add new type MessageType.purchase_notification
Add new models GuildProductPurchase and PurchaseNotification
Add Message.purchase_notification
Add category parameter to .abc.GuildChannel.clone (9941)
Add new models CallMessage
Add Message.call attribute
Adds RawMessageUpdateEvent.message attribute
Potentially speeds up on_message_edit by no longer copying data
This adds IntegrationTypeConfig
Retrievable via AppInfo.guild_integration_config and AppInfo.user_integration_config.
Editable via AppInfo.edit
Allow passing None for scopes parameter in utils.oauth_url (10078)
Add support for MessageType.poll_result messages (9905)
Add various new MessageFlags
Add Member.fetch_voice (9908)
Add Guild.dm_spam_detected_at and Guild.is_dm_spam_detected (9808)
Add Guild.raid_detected_at and Guild.is_raid_detected (9808)
Add Client.fetch_premium_sticker_pack (9909)
Add AppInfo.approximate_user_install_count (9915)
Add Guild.fetch_role (9921)
Add Attachment.title (9904)
Add Member.guild_banner and Member.display_banner
Re-add connector parameter that was removed during v2.0 (9900)
|commands| Add ~discord.ext.commands.SoundboardSoundConverter (9973)
Change the default file size limit for Guild.filesize_limit to match new Discord limit of 10 MiB (10084)
This fixes an issue causing excessive IDENTIFY in large bots
Fix potential performance regression when dealing with cookies in the library owned session (9916)
This allows voice to continue working when the older encryption modes eventually get removed.
Support for DAVE is still tentative.
Fix large performance regression due to polls when creating messages
Fix cases where Member.roles contains a None role (10093)
Update all channel clone implementations to work as expected (9935)
Fix bug in Client.entitlements only returning 100 entries (10051)
Fix TextChannel.clone always sending slowmode when not applicable to news channels (9967)
Fix Message.system_content for MessageType.role_subscription_purchase renewals (9955)
Fix Sticker.url for GIF stickers (9913)
Fix User.default_avatar for team users and webhooks (9907)
Fix potential rounding error in Poll.duration (9903)
Fix introduced potential TypeError when raising app_commands.CommandSyncFailure
Fix AuditLogEntry.target causing errors for AuditLogAction.message_pin and AuditLogAction.message_unpin actions (10061).
Fix incorrect ui.Select maximum option check (9878, 9879)
Fix path sanitisation for absolute Windows paths when using __main__ (10096, 10097)
|tasks| Fix race condition when setting timer handle when using uvloop (10020)
|commands| Fix issue with category cooldowns outside of guild channels (9959)
|commands| Fix Context.defer unconditionally deferring
|commands| Fix callable FlagConverter defaults on hybrid commands not being called (10037)
|commands| Unwrap ~discord.ext.commands.Parameter if given as default to ~ext.commands.parameter (9977)
|commands| Fix fallback behaviour not being respected when calling replace for ~.ext.commands.Parameter (10076, 10077)
|commands| Respect enabled keyword argument for hybrid app commands (10001)
Use a fallback package for audioop to allow the library to work in Python 3.13 or newer.
Remove aiodns from being used on Windows (9898)
This can be installed using discord.py[speed]
Add proxy support fetching from the CDN (9966)
Remove / from being safe from URI encoding when constructing paths internally
Sanitize invite argument before calling the invite info endpoint
Avoid returning in finally in specific places to prevent exception swallowing (9981, 9984)
Enforce and create random nonces when creating messages throughout the library
Revert IPv6 block in the library (9870)
Allow passing Permissions object to app_commands.default_permissions decorator (9951, 9971)
Add support for allowed contexts in app commands (9760).
An "allowed context" is the location where an app command can be used.
This is an internal change to decorators such as app_commands.guild_only and app_commands.dm_only.
Add app_commands.private_channel_only.
Add app_commands.allowed_contexts.
Add app_commands.AppCommandContext.
Add app_commands.Command.allowed_contexts.
Add app_commands.AppCommand.allowed_contexts.
Add app_commands.ContextMenu.allowed_contexts.
Add app_commands.Command.allowed_installs.
Add app_commands.AppCommand.allowed_installs.
Add app_commands.ContextMenu.allowed_installs.
Add app_commands.allowed_installs.
Add app_commands.guild_install.
Add app_commands.user_install.
Add app_commands.AppInstallationType.
Add Interaction.context.
Add Interaction.is_guild_integration.
Add Interaction.is_user_integration.
Polls can be created using Poll and the poll keyword-only parameter in various message sending methods.
Add PollAnswer and PollMedia.
Add Intents.polls, Intents.guild_polls and Intents.dm_polls intents.
Add Message.end_poll method to end polls.
Add new events, on_poll_vote_add, on_poll_vote_remove, on_raw_poll_vote_add, and on_raw_poll_vote_remove.
Voice handling has been completely rewritten to hopefully fix many bugs (9525, 9528, 9536, 9572, 9576, 9596, 9683, 9699, 9772, etc.)
Add DMChannel.recipients to get all recipients of a DM channel (9760).
Add support for RawReactionActionEvent.message_author_id.
Add support for AuditLogAction.creator_monetization_request_created and AuditLogAction.creator_monetization_terms_accepted.
Add support for AttachmentFlags, accessed via Attachment.flags (9486).
Add support for RoleFlags, accessed via Role.flags (9485).
Add support for ChannelType.media, accessed via ForumChannel.is_media.
Add Permissions.events.
Add Permissions.create_events.
Add Permissions.view_creator_monetization_analytics.
Add Permissions.send_polls
Add Permissions.create_polls.
Add Permissions.use_external_apps.
Add shortcut for CategoryChannel.forums.
Add encoder options to VoiceClient.play (9527).
Add TeamMemberRole.
Add TeamMember.role.
Updated Bot.owner_ids to account for team roles. Team owners or developers are considered Bot owners.
Add optional attribute integration_type in AuditLogEntry.extra for kick or member_role_update actions.
In order to use this, you must subclass ui.DynamicItem.
This is an alternative to persistent views.
Add Client.add_dynamic_items.
Add Client.remove_dynamic_items.
Add ui.Item.interaction_check.
Check the dynamic_counter example for more information.
Add Reaction.normal_count.
Add Reaction.burst_count.
Add Reaction.me_burst.
Add SelectDefaultValue.
Add SelectDefaultValueType.
Add a default_values attribute to each specialised select menu.
Add scheduled_event parameter for StageChannel.create_instance (9595).
Add type keyword argument to AutoModRuleAction.
Add AutoModTrigger.mention_raid_protection.
Add AutoModRuleTriggerType.member_profile.
Add AutoModRuleEventType.member_update.
Add AutoModRuleActionType.block_member_interactions.
Add multiple SKU and entitlement related classes, e.g. SKU, Entitlement, SKUFlags.
Add multiple enums, e.g. SKUType, EntitlementType, EntitlementOwnerType.
Add Client.fetch_skus and Client.fetch_entitlement to fetch from the API.
Add Client.create_entitlement to create entitlements.
Add Client.entitlements.
Add Interaction.entitlement_sku_ids.
Add Interaction.entitlements.
Add ButtonStyle.premium and ui.Button.sku_id to send a button asking the user to buy an SKU (9845).
Add support for one time purchase (9803).
Add AppInfo.interactions_endpoint_url.
Add AppInfo.redirect_uris.
Add AppInfo.edit.
Add PartialMessage.thread.
Add Message.thread.
Add Message.fetch_thread.
Add Activity.platform.
Add Game.platform.
Add Game.assets.
Add support for suppressing embeds in an interaction response (9678).
Add support for adding forum thread tags via webhook (9680) and (9783).
Add support for guild incident message types (9686).
Add Locale.latin_american_spanish (9689).
Add support for setting voice channel status (9603).
Add a shard connect timeout parameter to AutoShardedClient.
Updated Guild.edit with invites_disabled_until and dms_disabled_until parameters.
Add Guild.invites_paused_until.
Add Guild.dms_paused_until.
Add Guild.invites_paused.
Add Guild.dms_paused.
Add support for abc.User.avatar_decoration (9343).
Add support for GIF stickers (9737).
Add support for updating ClientUser banners (9752).
Add support for bulk banning members via Guild.bulk_ban.
Add reason keyword argument to Thread.delete (9804).
Add AppInfo.approximate_guild_count (9811).
Add support for Message.interaction_metadata (9817).
Add support for differing Invite types (9682).
Add support for reaction types to raw and non-raw models (9836).
|tasks| Add name parameter to ~ext.tasks.loop to name the internal asyncio.Task.
|commands| Add fallback behaviour to ~ext.commands.CurrentGuild.
|commands| Add logging for errors that occur during ~ext.commands.Cog.cog_unload.
Also supports application commands.
|commands| Add support for positional-only flag parameters (9805).
|commands| Add support for channel URLs in ChannelConverter related classes (9799).
Fix emoji and sticker cache being populated despite turning the intent off.
Fix outstanding chunk requests when receiving a gateway READY event not being cleared (9571).
Fix escape behaviour for lists and headers in ~utils.escape_markdown.
Fix alias value for Intents.auto_moderation (9524).
Fixes and improvements for FFmpegAudio and all related subclasses (9528).
Fix Template.source_guild attempting to resolve from cache (9535).
Fix IndexError being raised instead of ValueError when calling Colour.from_str with an empty string (9540).
Fix View.from_message not correctly creating the varying ui.Select types (9559).
Fix logging with autocomplete exceptions, which were previously suppressed.
Fix possible error in voice cleanup logic (9572).
Fix possible AttributeError during app_commands.CommandTree.sync when a command is regarded as 'too large'.
Fix possible TypeError if a app_commands.Group did not have a name set (9581).
Fix possible bad voice state where you move to a voice channel with missing permissions (9596).
Fix websocket reaching an error state due to received error payload (9561).
Fix handling of AuditLogDiff when relating to auto mod triggers (9622).
Fix race condition in voice logic relating to disconnect and connect (9683).
Use the Interaction.user guild as a fallback for Interaction.guild if not available.
Fix restriction on auto moderation audit log ID range.
Fix check for maximum number of children per ui.View.
Fix comparison between Object classes with a type set.
Fix handling of an enum in AutoModRule.edit (9798).
Fix handling of Client.close within Client.__aexit__ (9769).
Fix channel deletion not evicting related threads from cache (9796).
Fix bug with cache superfluously incrementing role positions (9853).
Fix exempt_channels not being passed along in Guild.create_automod_rule (9861).
Fix abc.GuildChannel.purge failing on single-message delete mode if the message was deleted (9830, 9863).
|commands| Fix localization support for ~ext.commands.HybridGroup fallback.
|commands| Fix nested ~ext.commands.HybridGroup's inserting manual app commands.
|commands| Fix an issue where ~ext.commands.HybridGroup wrapped instances would be out of sync.
|commands| Fix ~ext.commands.HelpCommand defined checks not carrying over during copy (9843).
Additional documentation added for logging capabilities.
Performance increases of constructing Permissions using keyword arguments.
Improve __repr__ of SyncWebhook and Webhook (9764).
Change internal thread names to be consistent (9538).
Fix the name parameter not being respected when sending a CustomActivity.
Fix the name parameter not being respected when sending a CustomActivity.
Fix Intents.emoji and Intents.emojis_and_stickers having swapped alias values (9471).
Fix NameError when using abc.GuildChannel.create_invite (9505).
Fix crash when disconnecting during the middle of a HELLO packet when using AutoShardedClient.
Fix voice websocket not being closed before being replaced by a new one (9518).
|commands| Fix the wrong ~ext.commands.HelpCommand.on_help_command_error being called when ejected from a cog.
|commands| Fix =None being displayed in ~ext.commands.Command.signature.
Fix username lookup in Guild.get_member_named (9451).
Fix username lookup in Guild.get_member_named (9451).
This bug usually manifested in incomplete channel objects (e.g. no overwrites) because Discord does not provide this data.
Fix false positives in PartialEmoji.from_str inappropriately setting animated to True (9456, 9457).
Fix certain select types not appearing in Message.components (9462).
|commands| Change lookup order for ~ext.commands.MemberConverter and ~ext.commands.UserConverter to prioritise usernames instead of nicknames.
Add support for the new username system (also known as "pomelo").
Add User.global_name to get their global nickname or "display name".
Update User.display_name and Member.display_name to understand global nicknames.
Update __str__ for User to drop discriminators if the user has been migrated.
Update Guild.get_member_named to work with migrated users.
Update User.default_avatar to work with migrated users.
|commands| Update user and member converters to understand migrated users.
Add DefaultAvatar.pink for new pink default avatars.
Add Colour.pink to get the pink default avatar colour.
Add MessageFlags.voice
Add Attachment.duration and Attachment.waveform
Add Attachment.is_voice_message
This does not support sending voice messages because this is currently unsupported by the API.
Add support for new Interaction.channel attribute from the API update (9339).
Add support for TextChannel.default_thread_slowmode_delay (9291).
Add support for ForumChannel.default_sort_order (9290).
Add support for default_reaction_emoji and default_forum_layout in Guild.create_forum (9300).
Add support for widget_channel, widget_enabled, and mfa_level in Guild.edit (9302, 9303).
Add new ~Permissions.manage_expressions, ~Permissions.use_external_sounds, ~Permissions.use_soundboard, ~Permissions.send_voice_messages, ~Permissions.create_expressions permissions.
Change Permissions.manage_emojis to be an alias of ~Permissions.manage_expressions.
Add various new properties to PartialAppInfo and AppInfo (9298).
Add support for with_counts parameter to Client.fetch_guilds (9369).
Add new Guild.get_emoji helper (9296).
Add ApplicationFlags.auto_mod_badge (9313).
Add Guild.max_stage_video_users and Guild.safety_alerts_channel (9318).
Add support for raid_alerts_disabled and safety_alerts_channel in Guild.edit (9318).
|commands| Add BadLiteralArgument.argument to get the failed argument's value (9283).
|commands| Add Context.filesize_limit property (9416).
|commands| Add support for Parameter.displayed_name (9427).
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 channel edits with Webhook.edit sending two requests instead of one.
Fix StageChannel.last_message_id always being None (9422).
Fix piped audio input ending prematurely (9001, 9380).
Fix persistent detection for ui.TextInput being incorrect if the custom_id is set later (9438).
Fix custom attributes not being copied over when inheriting from app_commands.Group (9383).
Fix AutoMod audit log entry error due to empty channel_id (9384).
Fix handling of around parameter in abc.Messageable.history (9388).
Fix occasional AttributeError when accessing the ClientUser.mutual_guilds property (9387).
Fix utils.escape_markdown not escaping the new markdown (9361).
Fix webhook targets not being converted in audit logs (9332).
Fix error when not passing enabled in Guild.create_automod_rule (9292).
Fix how various parameters are handled in Guild.create_scheduled_event (9275).
Fix not sending the ssrc parameter when sending the SPEAKING payload (9301).
Fix Message.guild being None sometimes when received via an interaction.
Fix Message.system_content for MessageType.channel_icon_change (9410).
Update the base Guild.filesize_limit to 25MiB (9353).
Allow Interaction webhook URLs to be used in Webhook.from_url.
Set the socket family of internal connector to AF_INET to prevent IPv6 connections (9442, 9443).
Fix crash from Discord sending null channel_id for automod audit logs.
Fix crash from Discord sending null channel_id for automod audit logs.
Fix channel edits when using Webhook.edit sending two requests.
Fix AuditLogEntry.target being None for invites (9336).
Fix KeyError when accessing data for GuildSticker (9324).
Fix UDP discovery in voice not using new 74 byte layout which caused voice to break (9277, 9278)
Fix UDP discovery in voice not using new 74 byte layout which caused voice to break (9277, 9278)
Nothing published for this version
Add support for new on_audit_log_entry_create event
Add support for new on_audit_log_entry_create event
This is queryable via MessageFlags.suppress_notifications
Implement abc.Messageable for StageChannel (9248)
Add setter for discord.ui.ChannelSelect.channel_types (9068)
Add support for custom messages in automod via AutoModRuleAction.custom_message (9267)
Add ForumChannel.get_thread (9106)
Add StageChannel.slowmode_delay and VoiceChannel.slowmode_delay (9111)
Add support for editing the slowmode for StageChannel and VoiceChannel (9111)
Add Locale.indonesian
Add delete_after keyword argument to Interaction.edit_message (9415)
Add delete_after keyword argument to InteractionMessage.edit (9206)
Accessible via Member.flags and has a type of MemberFlags
Support bypass_verification within Member.edit
This allows them to use views (assuming they are "bot owned" webhooks)
Add Colour.dark_embed and Colour.light_embed (9219)
Add support for many more parameters within Guild.create_stage_channel (9245)
Add AppInfo.role_connections_verification_url
Add support for ForumChannel.default_layout
Add various new MessageType values such as ones related to stage channel and role subscriptions
RoleSubscriptionInfo within Message.role_subscription
MessageType.role_subscription_purchase
SystemChannelFlags.role_subscription_purchase_notifications
SystemChannelFlags.role_subscription_purchase_notification_replies
RoleTags.subscription_listing_id
RoleTags.is_available_for_purchase
Add support for checking if a role is a linked role under RoleTags.is_guild_connection
Add support for GIF sticker type
Add support for Message.application_id and Message.position
Add utils.maybe_coroutine helper
Add ScheduledEvent.creator_id attribute
|commands| Add support for ~ext.commands.Cog.interaction_check for ~ext.commands.GroupCog (9189)
Fix views not being removed from message store backing leading to a memory leak when used from an application command context
Fix async iterators requesting past their bounds when using oldest_first and after or before (9093)
Fix Guild.audit_logs pagination logic being buggy when using after (9269)
Fix Message.channel sometimes being Object instead of PartialMessageable
Fix ui.View not properly calling super().__init_subclass__ (9231)
Fix available_tags and default_thread_slowmode_delay not being respected in Guild.create_forum
Fix AutoModTrigger ignoring allow_list with type keyword (9107)
Fix implicit permission resolution for Thread (9153)
Fix AutoModRule.edit to work with actual snowflake types such as Object (9159)
Fix Webhook.send returning ForumChannel for WebhookMessage.channel
When a lookup for AuditLogEntry.target fails, it will fallback to Object with the appropriate Object.type (9171)
Fix AuditLogDiff.type for integrations returning ChannelType instead of str (9200)
Fix AuditLogDiff.type for webhooks returning ChannelType instead of WebhookType (9251)
Fix webhooks and interactions not properly closing files after the request has completed
Fix NameError in audit log target for app commands
Fix ScheduledEvent.edit requiring some arguments to be passed in when unnecessary (9261, 9268)
|commands| Explicit set a traceback for hybrid command invocations (9205)
Add colour preview for the colours predefined in Colour
Finished views are no longer stored by the library when sending them (9235)
Force enable colour logging for the default logging handler when run under Docker.
Add various overloads for Client.wait_for to aid in static analysis (9184)
Interaction can now optionally take a generic parameter, ClientT to represent the type for Interaction.client
|commands| Respect ~ext.commands.Command.ignore_extra for ~discord.ext.commands.FlagConverter keyword-only parameters
|commands| Change Paginator.pages to not prematurely close (9257)
Fix crash involving GIF stickers when looking up their filename extension.
Fix crash involving GIF stickers when looking up their filename extension.
Add support for delete_message_seconds in Guild.ban (8391)
Add support for delete_message_seconds in Guild.ban (8391)
Add support for automod related audit log actions (8389)
Add support for ForumChannel annotations in app commands
Add support for ForumChannel.default_thread_slowmode_delay.
Add support for ForumChannel.default_reaction_emoji.
Tags can be obtained using ForumChannel.available_tags or ForumChannel.get_tag.
See Thread.edit and ForumChannel.edit for modifying tags and their usage.
These are split into separate classes, ~discord.ui.ChannelSelect, ~discord.ui.RoleSelect, ~discord.ui.UserSelect, ~discord.ui.MentionableSelect.
The decorator still uses a single function, ~discord.ui.select. Changing the select type is done by the cls keyword parameter.
Add support for toggling discoverable and invites_disabled features in Guild.edit (8390).
Add Interaction.translate helper method (8425).
Add Forum.archived_threads (8476).
Add ApplicationFlags.active, UserFlags.active_developer, and PublicUserFlags.active_developer.
Add delete_after to InteractionResponse.send_message (9022).
Add support for AutoModTrigger.regex_patterns.
|commands| Add GroupCog.group_extras to set app_commands.Group.extras (8405).
|commands| Add support for NumPy style docstrings for regular commands to set parameter descriptions.
|commands| Allow ~discord.ext.commands.Greedy to potentially maintain state between calls.
|commands| Add Cog.has_app_command_error_handler (8991).
|commands| Allow delete_after in Context.send on ephemeral messages (9021).
Fix an KeyError being raised when constructing app_commands.Group with no module (8411).
Fix unescaped period in webhook URL regex (8443).
Fix app_commands.CommandSyncFailure raising for other 400 status code errors.
Fix potential formatting issues showing _errors in app_commands.CommandSyncFailure.
Fix Guild.stage_instances and Guild.schedule_events clearing on GUILD_UPDATE.
Fix detection of overriden app_commands.Group.on_error
Fix app_commands.CommandTree.on_error still being called when a bound error handler is set.
Fix thread permissions being set to True in DMChannel.permissions_for (8965).
Fix on_scheduled_event_delete occasionally dispatching with too many parameters (9019).
|commands| Fix Context.from_interaction ignoring ~discord.ext.commands.Context.command_failed.
|commands| Fix ~discord.ext.commands.Range to allow 3.10 Union syntax (8446).
|commands| Fix before_invoke not triggering for fallback commands in a hybrid group command (8461, 8462).
Change error message for unbound callbacks in app_commands.ContextMenu to make it clearer that bound methods are not allowed.
Normalize type formatting in TypeError exceptions (8453).
Change VoiceProtocol.on_voice_state_update and VoiceProtocol.on_voice_server_update parameters to be positional only (8463).
Add support for PyCharm when using the default coloured logger (9015).
Fix __main__ script to use importlib.metadata instead of the deprecated pkg_resources.
Fix cchardet being installed on Python >=3.10 when using the speed extras.
Fix ui.View timeout updating when the ui.View.interaction_check failed.
Fix app_commands.CommandTree.on_error not triggering if ~app_commands.CommandTree.interaction_check raises.
Fix __main__ script to use importlib.metadata instead of the deprecated pkg_resources.
This required a change in the version_guarantees
|commands| Fix Python 3.10 union types not working with commands.Greedy.
The changeset for this version are too big to be listed here, for more information please see the migrating page .
The changeset for this version are too big to be listed here, for more information please see the migrating page.
Fix a crash involving guild uploaded stickers
Fix a crash involving guild uploaded stickers
Fix DMChannel.permissions_for not having Permissions.read_messages set.
Fix fail_if_not_exists causing certain message references to not be usable within abc.Messageable.send and Message.reply (6726)
Fix fail_if_not_exists causing certain message references to not be usable within abc.Messageable.send and Message.reply (6726)
Fix Guild.chunk hanging when the user left the guild. (6730)
Fix loop sleeping after final iteration rather than before (6744)
|commands| Fix Cog.has_error_handler not working as intended.
|commands| Fix Cog.has_error_handler not working as intended.
Development of v2.0 will have breaking changes and support for newer API features.
This version is mainly for improvements and bug fixes. This is more than likely the last major version in the 1.x series. Work after this will be spent on v2.0. As a result, this is the last version to support Python 3.5. Likewise, this is the last version to support user bots.
Development of v2.0 will have breaking changes and support for newer API features.
Add support for stage channels via StageChannel (6602, 6608)
By default, if the message you're replying to doesn't exist then the API errors out. This attribute tells the Discord API that it's okay for that message to be missing.
Add support for Discord's new permission serialisation scheme.
Add an easier way to move channels using abc.GuildChannel.move
Add Permissions.use_slash_commands
Add Permissions.request_to_speak
Add support for voice regions in voice channels via VoiceChannel.rtc_region (6606)
Add support for PartialEmoji.url_as (6341)
Add MessageReference.jump_url (6318)
Add File.spoiler (6317)
Add support for passing roles to Guild.estimate_pruned_members (6538)
Allow callable class factories to be used in abc.Connectable.connect (6478)
Add a way to get mutual guilds from the client's cache via User.mutual_guilds (2539, 6444)
PartialMessage.edit now returns a full Message upon success (6309)
Add RawMessageUpdateEvent.guild_id (6489)
AuditLogEntry is now hashable (6495)
Attachment is now hashable
Add Attachment.content_type attribute (6618)
Add support for casting Attachment to str to get the URL.
This only seeds it for one call. If seeding for multiple calls is desirable, use random.seed.
Add a utils.remove_markdown helper function (6573)
Add support for passing scopes to utils.oauth_url (6568)
|commands| Add support for rgb CSS function as a parameter to ColourConverter (6374)
|commands| Add support for converting StoreChannel via StoreChannelConverter (6603)
|commands| Add support for stripping whitespace after the prefix is encountered using the strip_after_prefix ~ext.commands.Bot constructor parameter.
|commands| Add Context.invoked_parents to get the aliases a command's parent was invoked with (1874, 6462)
|commands| Add a converter for PartialMessage under ext.commands.PartialMessageConverter (6308)
|commands| Add a converter for Guild under ext.commands.GuildConverter (6016, 6365)
This is also adds Cog.has_error_handler
|commands| Allow callable types to act as a bucket key for cooldowns (6563)
|commands| Add linesep keyword argument to Paginator (5975)
|commands| Allow None to be passed to HelpCommand.verify_checks to only verify in a guild context (2008, 6446)
|commands| Allow relative paths when loading extensions via a package keyword argument (2465, 6445)
Fix mentions not working if mention_author is passed in abc.Messageable.send without Client.allowed_mentions set (6192, 6458)
Note that currently, bot users still cannot set a custom activity due to a Discord limitation.
Fix ZeroDivisionError being raised from VoiceClient.average_latency (6430, 6436)
Fix User.public_flags not updating upon edit (6315)
Fix Message.call sometimes causing attribute errors (6390)
Fix issue resending a file during request retries on newer versions of aiohttp (6531)
Raise an error when user_ids is empty in Guild.query_members
Fix __str__ magic method raising when a Guild is unavailable.
Fix potential AttributeError when accessing VoiceChannel.members (6602)
Embed constructor parameters now implicitly convert to str (6574)
Ensure discord package is only run if executed as a script (6483)
|commands| Fix irrelevant commands potentially being unloaded during cog unload due to failure.
|commands| Fix attribute errors when setting a cog to ~.ext.commands.HelpCommand (5154)
|commands| Fix Context.invoked_with being improperly reassigned during a ~ext.commands.Context.reinvoke (6451, 6462)
|commands| Remove duplicates from HelpCommand.get_bot_mapping (6316)
|commands| Properly handle positional-only parameters in bot command signatures (6431)
|commands| Group signatures now properly show up in Command.signature (6529, 6530)
User endpoints and all userbot related functionality has been deprecated and will be removed in the next major version of the library.
Permission class methods were updated to match the UI of the Discord client (6476)
_ and - characters are now stripped when making a new cog using the discord package (6313)
This version comes with support for replies and stickers.
This version comes with support for replies and stickers.
There's now a dark theme, feel free to navigate to the cog on the screen to change your setting, though this should be automatic.
Add support for AppInfo.icon_url_as and AppInfo.cover_image_url_as (5888)
Add Colour.random to get a random colour (6067)
Add support for stickers via Sticker (5946)
This also comes with the AllowedMentions.replied_user setting.
abc.Messageable.send can now accept a MessageReference.
MessageReference can now be constructed by users.
Message.to_reference can now convert a message to a MessageReference.
Add support for getting the replied to resolved message through MessageReference.resolved.
Guild.premium_subscriber_role to get the "Nitro Booster" role (if available).
Guild.self_role to get the bot's own role (if available).
Role.tags to get the role's tags.
Role.is_premium_subscriber to check if a role is the "Nitro Booster" role.
Role.is_bot_managed to check if a role is a bot role (i.e. the automatically created role for bots).
Role.is_integration to check if a role is role created by an integration.
ShardInfo.is_ws_ratelimited is the equivalent for checking a specific shard.
Add support for chunking an AsyncIterator through AsyncIterator.chunk (6100, 6082)
Add PartialEmoji.created_at (6128)
This adds WebhookMessage as well to power this behaviour.
This is useful if you don't want to incur an extra API call to fetch the message.
Add Emoji.url_as (6162)
Add support for Member.pending for the membership gating feature.
Allow colour parameter to take int in Guild.create_role (6195)
Add support for presences in Guild.query_members (2354)
|commands| Add support for description keyword argument in commands.Cog (6028)
|tasks| Add support for calling the wrapped coroutine as a function via __call__.
Raise DiscordServerError when reaching 503s repeatedly (6044)
Fix AttributeError when Client.fetch_template is called (5986)
Fix errors when playing audio and moving to another channel (5953)
Fix AttributeError when voice channels disconnect too fast (6039)
Fix stale User references when the members intent is off.
Fix on_user_update not dispatching in certain cases when a member is not cached but the user somehow is.
This would previously make it so Message.author is a User.
Fix UnboundLocalError for editing public_updates_channel in Guild.edit (6093)
Fix uninitialised CustomActivity.created_at (6095)
|commands| Errors during cog unload no longer stops module cleanup (6113)
|commands| Properly cleanup lingering commands when a conflicting alias is found when adding commands (6217)
ffmpeg spawned processes no longer open a window in Windows (6038)
Update dependencies to allow the library to work on Python 3.9+ without requiring build tools. (5984, 5970)
Fix docstring issue leading to a SyntaxError in 3.9 (6153)
Update Windows opus binaries from 1.2.1 to 1.3.1 (6161)
Allow Guild.create_role to accept int as the colour parameter (6195)
|commands| MessageConverter regex got updated to support www. prefixes (6002)
|commands| UserConverter now fetches the API if an ID is passed and the user is not cached.
|commands| max_concurrency is now called before cooldowns (6172)
Fix utils.escape_markdown not escaping quotes properly (5897)
Fix utils.escape_markdown not escaping quotes properly (5897)
Fix Message not being hashable (5901, 5866)
Fix moving channels to the end of the channel list (5923)
Fix seemingly strange behaviour in __eq__ for PermissionOverwrite (5929)
Fix aliases showing up in __iter__ for Intents (5945)
Fix the bot disconnecting from voice when moving them to another channel (5904)
Fix attribute errors when chunking times out sometimes during delayed on_ready dispatching.
Ensure that the bot's own member is not evicted from the cache (5949)
Members are now loaded during GUILD_MEMBER_UPDATE events if MemberCacheFlags.joined is set. (5930)
This is the same as having discord.Member as the type-hint.
Guild.chunk now allows concurrent calls without spamming the gateway with requests.
This version came with forced breaking changes that Discord is requiring all bots to go through on October 7th. It is highly recommended to read the d…
This version came with forced breaking changes that Discord is requiring all bots to go through on October 7th. It is highly recommended to read the documentation on intents, intents_primer.
Members and presences will no longer be retrieved due to an API change. See privileged_intents for more info.
As a consequence, fetching offline members is disabled if the members intent is not enabled.
Support for gateway intents, passed via intents in Client using Intents.
Add VoiceRegion.south_korea (5233)
Add support for __eq__ for Message (5789)
Add Colour.dark_theme factory method (1584)
Add AllowedMentions.none and AllowedMentions.all (5785)
Add more concrete exceptions for 500 class errors under DiscordServerError (5797)
Implement VoiceProtocol to better intersect the voice flow.
Add Guild.chunk to fully chunk a guild.
Add MemberCacheFlags to better control member cache. See intents_member_cache for more info.
This seems currently unused API wise.
Add support for message references, Message.reference (5754, 5832)
Add alias for ColourConverter under ColorConverter (5773)
Add alias for PublicUserFlags.verified_bot_developer under PublicUserFlags.early_verified_bot_developer (5849)
|commands| Add support for require_var_positional for Command (5793)
Fix issue with Guild.by_category not showing certain channels.
Fix abc.GuildChannel.permissions_synced always being False (5772)
Fix handling of cloudflare bans on webhook related requests (5221)
Fix cases where a keep-alive thread would ack despite already dying (5800)
Fix cases where a Member reference would be stale when cache is disabled in message events (5819)
Fix allowed_mentions not being sent when sending a single file (5835)
Fix overwrites being ignored in abc.GuildChannel.edit if {} is passed (5756, 5757)
|commands| Fix exceptions being raised improperly in command invoke hooks (5799)
|commands| Fix commands not being properly ejected during errors in a cog injection (5804)
|commands| Fix cooldown timing ignoring edited timestamps.
|tasks| Fix tasks extending the next iteration on handled exceptions (5762, 5763)
Webhook requests are now logged (5798)
Remove caching layer from AutoShardedClient.shards. This was causing issues if queried before launching shards.
Gateway rate limits are now handled.
Warnings logged due to missed caches are now changed to DEBUG log level.
Some strings are now explicitly interned to reduce memory usage.
Usage of namedtuples has been reduced to avoid potential breaking changes in the future (5834)
|commands| All BadArgument exceptions from the built-in converters now raise concrete exceptions to better tell them apart (5748)
|tasks| Lazily fetch the event loop to prevent surprises when changing event loop policy (5808)
This is a maintenance release with backports from vp1p5p0.
This is a maintenance release with backports from vp1p5p0.
Fix issue with Guild.by_category not showing certain channels.
Fix abc.GuildChannel.permissions_synced always being False (5772)
Fix handling of cloudflare bans on webhook related requests (5221)
Fix cases where a keep-alive thread would ack despite already dying (5800)
Fix cases where a Member reference would be stale when cache is disabled in message events (5819)
Fix allowed_mentions not being sent when sending a single file (5835)
Fix overwrites being ignored in abc.GuildChannel.edit if {} is passed (5756, 5757)
|commands| Fix exceptions being raised improperly in command invoke hooks (5799)
|commands| Fix commands not being properly ejected during errors in a cog injection (5804)
|commands| Fix cooldown timing ignoring edited timestamps.
|tasks| Fix tasks extending the next iteration on handled exceptions (5762, 5763)
Remove caching layer from AutoShardedClient.shards. This was causing issues if queried before launching shards.
|tasks| Lazily fetch the event loop to prevent surprises when changing event loop policy (5808)
Properly terminate the connection when Client.close is called (5207)
Properly terminate the connection when Client.close is called (5207)
Fix error being raised when clearing embed author or image when it was already cleared (5210, 5212)
Fix __path__ to allow editable extensions (5213)
Another version with a long development time. Features like Intents are slated to be released in a v1.5 release. Thank you for your patience!
Another version with a long development time. Features like Intents are slated to be released in a v1.5 release. Thank you for your patience!
This can be set globally through Client.allowed_mentions
This can also be set on a per message basis via abc.Messageable.send
Add ShardInfo which allows fetching specific information about a shard.
The ShardInfo allows for reconnecting and disconnecting of a specific shard as well.
Add AutoShardedClient.get_shard and AutoShardedClient.shards to get information about shards.
Rework the entire connection flow to better facilitate the IDENTIFY rate limits.
Add a hook Client.before_identify_hook to have better control over what happens before an IDENTIFY is done.
Add more shard related events such as on_shard_connect, on_shard_disconnect and on_shard_resumed.
This adds Template to read a template's information.
Client.fetch_template can be used to fetch a template's information from the API.
Client.create_guild can now take an optional template to base the creation from.
Note that fetching a guild's template is currently restricted for bot accounts.
Integration is used to read integration information.
IntegrationAccount is used to read integration account information.
Guild.integrations will fetch all integrations in a guild.
Guild.create_integration will create an integration.
Integration.edit will edit an existing integration.
Integration.delete will delete an integration.
Integration.sync will sync an integration.
There is currently no support in the audit log for this.
Add an alias for VerificationLevel.extreme under VerificationLevel.very_high (2650)
Add various grey to gray aliases for Colour (5130)
Added VoiceClient.latency and VoiceClient.average_latency (2535)
Add use_cached and spoiler parameters to Attachment.to_file (2577, 4095)
Add position parameter support to Guild.create_category (2623)
Allow passing int for the colour in Role.edit (4057)
Add Embed.remove_author to clear author information from an embed (4068)
Add the ability to clear images and thumbnails in embeds using Embed.Empty (4053)
Add Guild.max_video_channel_users (4120)
Add Guild.public_updates_channel (4120)
Add guild_ready_timeout parameter to Client and subclasses to control timeouts when the GUILD_CREATE stream takes too long (4112)
Add support for public user flags via User.public_flags and PublicUserFlags (3999)
Allow changing of channel types via TextChannel.edit to and from a news channel (4121)
Add Guild.edit_role_positions to bulk edit role positions in a single API call (2501, 2143)
Add Guild.change_voice_state to change your voice state in a guild (5088)
Add PartialInviteGuild.is_icon_animated for checking if the invite guild has animated icon (4180, 4181)
Add PartialInviteGuild.icon_url_as now supports static_format for consistency (4180, 4181)
Add support for user_ids in Guild.query_members
Add support for pruning members by roles in Guild.prune_members (4043)
|commands| Implement ~ext.commands.before_invoke and ~ext.commands.after_invoke decorators (1986, 2502)
|commands| Add a way to retrieve retry_after from a cooldown in a command via Command.get_cooldown_retry_after (5195)
|commands| Add a way to dynamically add and remove checks from a HelpCommand (5197)
|tasks| Add Loop.is_running method to the task objects (2540)
|tasks| Allow usage of custom error handlers similar to the command extensions to tasks using Loop.error decorator (2621)
Fix issue with PartialEmoji.url reads leading to a failure (4015, 4016)
Allow abc.Messageable.history to take a limit of 1 even if around is passed (4019)
Fix Guild.member_count not updating in certain cases when a member has left the guild (4021)
Fix the type of Object.id not being validated. For backwards compatibility str is still allowed but is converted to int (4002)
Fix Guild.edit not allowing editing of notification settings (4074, 4047)
Fix crash when the guild widget contains channels that aren't in the payload (4114, 4115)
Close ffmpeg stdin handling from spawned processes with FFmpegOpusAudio and FFmpegPCMAudio (4036)
Fix utils.escape_markdown not escaping masked links (4206, 4207)
Fix reconnect loop due to failed handshake on region change (4210, 3996)
Fix Guild.by_category not returning empty categories (4186)
Fix certain JPEG images not being identified as JPEG (5143)
Fix a crash when an incomplete guild object is used when fetching reaction information (5181)
Fix a timeout issue when fetching members using Guild.query_members
Fix an issue with domain resolution in voice (5188, 5191)
Fix an issue where PartialEmoji.id could be a string (4153, 4152)
Fix regression where Member.activities would not clear.
|commands| A TypeError is now raised when typing.Optional is used within commands.Greedy (2253, 5068)
|commands| Bot.walk_commands no longer yields duplicate commands due to aliases (2591)
|commands| Fix regex characters not being escaped in HelpCommand.clean_prefix (4058, 4071)
|commands| Fix Bot.get_command from raising errors when a name only has whitespace (5124)
|commands| Fix issue with Context.subcommand_passed not functioning as expected (5198)
|tasks| Task objects are no longer stored globally so two class instances can now start two separate tasks (2294)
|tasks| Allow cancelling the loop within before_loop (4082)
The Member.roles cache introduced in v1.3 was reverted due to issues caused (4087, 4157)
Webhook objects are now comparable and hashable (4182)
TextChannel.follow
Message.pin and Message.unpin
Webhook.delete and Webhook.edit
For performance reasons websockets has been dropped in favour of aiohttp.ws.
The blocking logging message now shows the stack trace of where the main thread was blocking
The domain name was changed from discordapp.com to discord.com to prepare for the required domain migration
Reduce memory usage when reconnecting due to stale references being held by the message cache (5133)
Optimize abc.GuildChannel.permissions_for by not creating as many temporary objects (20-32% savings).
|commands| Raise ~ext.commands.CommandRegistrationError instead of ClientException when a duplicate error is registered (4217)
|tasks| No longer handle HTTPException by default in the task reconnect loop (5193)
Fix an issue with channel overwrites causing multiple issues including crashes (5109)
Fix an issue with channel overwrites causing multiple issues including crashes (5109)
Change default WS close to 4000 instead of 1000.
The previous close code caused sessions to be invalidated at a higher frequency than desired.
Fix None appearing in Member.activities. (2619)
Higher the wait time during the GUILD_CREATE stream before on_ready is fired for AutoShardedClient.
Another minor bug fix release.
Higher the wait time during the GUILD_CREATE stream before on_ready is fired for AutoShardedClient.
on_voice_state_update now uses the inner member payload which should make it more reliable.
Fix various Cloudflare handling errors (2572, 2544)
Fix crashes if Message.guild is Object instead of Guild.
Fix Webhook.send returning an empty string instead of None when wait=False.
Fix invalid format specifier in webhook state (2570)
|commands| Passing invalid permissions to permission related checks now raises TypeError.
Fix fetching invites in guilds that the user is not in.
Minor bug fix release.
Fix fetching invites in guilds that the user is not in.
Fix the channel returned from Client.fetch_channel raising when sending messages. (2531)
Fix compatibility warnings when using the Python 3.9 alpha.
Change the unknown event logging from WARNING to DEBUG to reduce noise.
This version comes with a lot of bug fixes and new features. It's been in development for a lot longer than was anticipated!
This version comes with a lot of bug fixes and new features. It's been in development for a lot longer than was anticipated!
Add Guild.fetch_members to fetch members from the HTTP API. (2204)
Add Guild.fetch_roles to fetch roles from the HTTP API. (2208)
Add support for teams via Team when fetching with Client.application_info. (2239)
Add support for suppressing embeds via Message.edit
Add support for guild subscriptions. See the Client documentation for more details.
Add VoiceChannel.voice_states to get voice states without relying on member cache.
Add Guild.query_members to request members from the gateway.
Add FFmpegOpusAudio and other voice improvements. (2258)
Add RawMessageUpdateEvent.channel_id for retrieving channel IDs during raw message updates. (2301)
Add RawReactionActionEvent.event_type to disambiguate between reaction addition and removal in reaction events.
Add abc.GuildChannel.permissions_synced to query whether permissions are synced with the category. (2300, 2324)
Add MessageType.channel_follow_add message type for announcement channels being followed. (2314)
Add Message.is_system to allow for quickly filtering through system messages.
Add VoiceState.self_stream to indicate whether someone is streaming via Go Live. (2343)
Add Emoji.is_usable to check if the client user can use an emoji. (2349)
Add VoiceRegion.europe and VoiceRegion.dubai. (2358, 2490)
Add TextChannel.follow to follow a news channel. (2367)
Add Permissions.view_guild_insights permission. (2415)
Note that integration support is not finalized.
Add Webhook.type to query the type of webhook (WebhookType). (2441)
Allow bulk editing of channel overwrites through abc.GuildChannel.edit. (2198)
Add Activity.created_at to see when an activity was started. (2446)
Add support for xsalsa20_poly1305_lite encryption mode for voice. (2463)
Add RawReactionActionEvent.member to get the member who did the reaction. (2443)
Add support for new YouTube streaming via Streaming.platform and Streaming.game. (2445)
Add Guild.discovery_splash_url to get the discovery splash image asset. (2482)
It should be noted that this feature is restricted to those who are either in Server Discovery or planning to be there.
Add support for message flags via Message.flags and MessageFlags. (2433)
Add User.system and Profile.system to know whether a user is an official Discord Trust and Safety account.
Add Profile.team_user to check whether a user is a member of a team.
Add Attachment.to_file to easily convert attachments to File for sending.
Permissions.manage_permissions
Permissions.view_channel
Permissions.use_external_emojis
Add support for passing keyword arguments when creating Permissions.
Note that as of now, bots cannot send custom activities yet.
Add support for on_invite_create and on_invite_delete events.
Message.clear_reaction and Reaction.clear methods.
on_raw_reaction_clear_emoji and on_reaction_clear_emoji events.
Add utils.sleep_until helper to sleep until a specific datetime. (2517, 2519)
|commands| Add support for teams and Bot.owner_ids to have multiple bot owners. (2239)
|commands| Add new BucketType.role bucket type. (2201)
|commands| Expose Command.cog property publicly. (2360)
|commands| Add non-decorator interface for adding checks to commands via Command.add_check and Command.remove_check. (2411)
|commands| Add has_guild_permissions check. (2460)
|commands| Add bot_has_guild_permissions check. (2460)
|commands| Add predicate attribute to checks decorated with ~.ext.commands.check.
|commands| Add ~.ext.commands.check_any check to logical OR multiple checks.
|commands| Add ~.ext.commands.max_concurrency to allow only a certain amount of users to use a command concurrently before waiting or erroring.
|commands| Add support for calling a ~.ext.commands.Command as a regular function.
|tasks| Loop.add_exception_type now allows multiple exceptions to be set. (2333)
|tasks| Add Loop.next_iteration property. (2305)
Fix issue with permission resolution sometimes failing for guilds with no owner.
Tokens are now stripped upon use. (2135)
Passing in a name is no longer required for Emoji.edit. (2368)
Fix issue with webhooks not re-raising after retries have run out. (2272, 2380)
Fix mismatch in URL handling in utils.escape_markdown. (2420)
Fix issue with ports being read in little endian when they should be big endian in voice connections. (2470)
Fix Member.mentioned_in not taking into consideration the message's guild.
Fix bug with moving channels when there are gaps in positions due to channel deletion and creation.
Fix on_shard_ready not triggering when fetch_offline_members is disabled. (2504)
Fix issue with large sharded bots taking too long to actually dispatch on_ready.
Fix issue with fetching group DM based invites in Client.fetch_invite.
Fix out of order files being sent in webhooks when there are 10 files.
|commands| Extensions that fail internally due to ImportError will no longer raise ~.ext.commands.ExtensionNotFound. (2244, 2275, 2291)
|commands| Updating the Paginator.suffix will not cause out of date calculations. (2251)
|commands| Allow converters from custom extension packages. (2369, 2374)
|commands| Fix issue with paginator prefix being None causing empty pages. (2471)
|commands| ~.commands.Greedy now ignores parsing errors rather than propagating them.
|commands| Command.can_run now checks whether a command is disabled.
|commands| HelpCommand.clean_prefix now takes into consideration nickname mentions. (2489)
|commands| Context.send_help now properly propagates to the HelpCommand.on_help_command_error handler.
The library now fully supports Python 3.8 without warnings.
Bump the dependency of websockets to 8.0 for those who can use it. (2453)
Due to Discord providing Member data in mentions, users will now be upgraded to Member more often if mentioned.
utils.escape_markdown now properly escapes new quote markdown.
The message cache can now be disabled by passing None to max_messages in Client.
The default message cache size has changed from 5000 to 1000 to accommodate small bots.
Lower memory usage by only creating certain objects as needed in Role.
There is now a sleep of 5 seconds before re-IDENTIFYing during a reconnect to prevent long loops of session invalidation.
Along with that, the rate limiting code now uses Discord's response to wait. If you need to use the system clock again for whatever reason, consider passing assume_synced_clock in Client.
The performance of Guild.default_role has been improved from O(N) to O(1). (2375)
The performance of Member.roles has improved due to usage of caching to avoid surprising performance traps.
The GC is manually triggered during things that cause large deallocations (such as guild removal) to prevent memory fragmentation.
There have been many changes to the documentation for fixes both for usability, correctness, and to fix some linter errors. Thanks to everyone who contributed to those.
The loading of the opus module has been delayed which would make the result of opus.is_loaded somewhat surprising.
|commands| Usernames prefixed with @ inside DMs will properly convert using the User converter. (2498)
|tasks| The task sleeping time will now take into consideration the amount of time the task body has taken before sleeping. (2516)
Fix a bug that caused crashes due to missing animated field in Emoji structures in reactions.
Fix a bug that caused crashes due to missing animated field in Emoji structures in reactions.
Fix a regression when Message.channel would be None.
Fix a regression when Message.channel would be None.
Fix a regression where Message.edited_at would not update during edits.
Fix a crash that would trigger during message updates (2265, 2287).
Fix a bug when VoiceChannel.connect would not return (2274, 2372, 2373, 2377).
Fix a crash relating to token-less webhooks (2364).
Fix issue where Guild.premium_subscription_count would be None due to a Discord bug. (2331, 2376).
Fix an AttributeError when accessing Member.premium_since in on_member_update. (2213)
Fix an AttributeError when accessing Member.premium_since in on_member_update. (2213)
Handle asyncio.CancelledError in abc.Messageable.typing context manager. (2218)
Raise the max encoder bitrate to 512kbps to account for nitro boosting. (2232)
Properly propagate exceptions in Client.run. (2237)
|commands| Ensure cooldowns are properly copied when used in cog level command_attrs.
Audit log related attribute access have been fixed to not error out when they shouldn't have.
Audit log related attribute access have been fixed to not error out when they shouldn't have.
User.avatar_url and related attributes no longer raise an error.
User.avatar_url and related attributes no longer raise an error.
More compatibility shims with the enum.Enum code.
This should not be a breaking change for most users due to duck-typing.
This update mainly brings performance improvements and various nitro boosting attributes (referred to in the API as "premium guilds").
Add Guild.premium_tier to query the guild's current nitro boost level.
Add Guild.emoji_limit, Guild.bitrate_limit, Guild.filesize_limit to query the new limits of a guild when taking into consideration boosting.
Add Guild.premium_subscription_count to query how many members are boosting a guild.
Add Member.premium_since to query since when a member has boosted a guild.
Add Guild.premium_subscribers to query all the members currently boosting the guild.
This includes a new type named SystemChannelFlags
Add Emoji.available to query if an emoji can be used (within the guild or otherwise).
Add support for animated icons in Guild.icon_url_as and Guild.icon_url.
Add Guild.is_icon_animated.
Add support for the various new MessageType involving nitro boosting.
Add VoiceRegion.india. (2145)
Add Embed.insert_field_at. (2178)
Add a type attribute for all channels to their appropriate ChannelType. (2185)
Add Client.fetch_channel to fetch a channel by ID via HTTP. (2169)
Add Guild.fetch_channels to fetch all channels via HTTP. (2169)
|tasks| Add Loop.stop to gracefully stop a task rather than cancelling.
|tasks| Add Loop.failed to query if a task had failed somehow.
|tasks| Add Loop.change_interval to change the sleep interval at runtime (2158, 2162)
Fix internal error when using Guild.prune_members.
|commands| Fix .Command.invoked_subcommand being invalid in many cases.
|tasks| Reset iteration count when the loop terminates and is restarted.
|tasks| The decorator interface now works as expected when stacking (2154)
This was done by replacing the enum.Enum code with an API compatible one.
This should not be a breaking change for most users due to duck-typing.
Improve performance of message creation by about 1.5x.
Improve performance of message editing by about 1.5-4x depending on payload size.
Improve performance of attribute access on Member about by 2x.
Improve performance of utils.get by around 4-6x depending on usage.
Improve performance of event parsing lookup by around 2.5x.
Keyword arguments in Client.start and Client.run are now validated (953, 2170)
The Discord error code is now shown in the exception message for HTTPException.
Internal tasks launched by the library will now have their own custom __repr__.
All public facing types should now have a proper and more detailed __repr__.
|tasks| Errors are now logged via the standard py:logging module.
Webhooks do not overwrite data on retrying their HTTP requests (2140)
Webhooks do not overwrite data on retrying their HTTP requests (2140)
Add back signal handling to Client.run due to issues some users had with proper cleanup.
There is a new extension dedicated to making background tasks easier.
You can check the documentation here: ext_tasks_api.
Add Permissions.stream permission. (2077)
Add equality comparison and hash support to Asset
Add compute_prune_members parameter to Guild.prune_members (2085)
Add Client.cached_messages attribute to fetch the message cache (2086)
Add abc.GuildChannel.clone to clone a guild channel. (2093)
Add delay keyword-only argument to Message.delete (2094)
Add support for <:name:id> when adding reactions (2095)
Add Asset.read to fetch the bytes content of an asset (2107)
Add Attachment.read to fetch the bytes content of an attachment (2118)
Add support for voice kicking by passing None to Member.move_to.
Add new ~.commands.dm_only check.
Support callable converters in ~.commands.Greedy
This allows you to use Message as a type hint in functions.
Allow passing cls in the ~.commands.group decorator (2061)
Add .Command.parents to fetch the parents of a command (2104)
Fix AttributeError when using __repr__ on Widget.
Fix issue with abc.GuildChannel.overwrites returning None for keys.
Remove incorrect legacy NSFW checks in e.g. TextChannel.is_nsfw.
Fix UnboundLocalError when RequestsWebhookAdapter raises an error.
Fix bug where updating your own user did not update your member instances.
Tighten constraints of __eq__ in Spotify objects (2113, 2117)
Fix lambda converters in a non-module context (e.g. eval).
This prevents cooldowns from triggering during e.g. a RESUME session.
Fix the default on_command_error to work with new-style cogs (2094)
DM channels are now recognised as NSFW in ~.commands.is_nsfw check.
Fix race condition with help commands (2123)
Fix cog descriptions not showing in ~.commands.MinimalHelpCommand (2139)
Improve the performance of internal enum creation in the library by about 5x.
Make the output of python -m discord --version a bit more useful.
The loop cleanup facility has been rewritten again.
The signal handling in Client.run has been removed.
Custom exception classes are now used for all default checks in the library (2101)
Fix issue with speaking state being cast to int when it was invalid.
Fix issue with speaking state being cast to int when it was invalid.
Fix some issues with loop cleanup that some users experienced on Linux machines.
Fix voice handshake race condition (2056, 2063)
The changeset for this version are too big to be listed here, for more information please see the migrating page .
The changeset for this version are too big to be listed here, for more information please see the migrating page.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix issue with Client.create_server that made it stop working.
Fix issue with Client.create_server that made it stop working.
Fix main thread being blocked upon calling StreamPlayer.stop.
Handle HEARTBEAT_ACK and resume gracefully when it occurs.
Fix race condition when pre-emptively rate limiting that caused releasing an already released lock.
Fix invalid state errors when immediately cancelling a coroutine.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
This release is just a bug fix release with some better rate limit implementation.
This release is just a bug fix release with some better rate limit implementation.
Servers are now properly chunked for user bots.
The CDN URL is now used instead of the API URL for assets.
Rate limit implementation now tries to use header information if possible.
Event loop is now properly propagated (420)
Allow falsey values in Client.send_message and Client.send_file.
Add Channel.overwrites to get all the permission overwrites of a channel.
Add Channel.overwrites to get all the permission overwrites of a channel.
Add Server.features to get information about partnered servers.
Timeout when waiting for offline members while triggering on_ready.
The fact that we did not timeout caused a gigantic memory leak in the library that caused thousands of duplicate Member instances causing big memory spikes.
Discard null sequences in the gateway.
The fact these were not discarded meant that on_ready kept being called instead of on_resumed. Since this has been corrected, in most cases on_ready will be called once or twice with on_resumed being called much more often.
Your coding agent can read these notes before it upgrades. Set up the MCP server →