serenity
A Rust library for the Discord API.
0.12.5
6.5M downloads/mo
#3952 most downloaded on crates.io
serenity-rs/serenity
What this package is like to depend on
Last release 8 months ago
20 Dec 2025
Release timing varies
gaps range from 9 days to 1.1 years
Nearly every release is documented
notes for 80 of 84 stable releases
2 versions withdrawn
withdrawn after publishing
10 years old
97 releases · first in 2016
1 release in the last 12 months
see the full history below
Release timeline
97 releases · Nov 2016 to Dec 2025Releases
latest 60 of 97-
0.12.520 Dec 2025Release notes
Open source →This compiles all of the changes that had accumulated since the prior release,
and, unless another minor release is warranted, constitutes as the last release
for the 0.12.x series.We also extend our heartfelt thanks to @jamesbt365, who passed away a few
months ago. We deeply appreciate his code contributions, which started back in
2023, as well as his social contributions for helping people with using
Serenity, Songbird, and Poise, on Github and/or Discord. We were saddened to
hear that he's no longer with us, but we hope he rests well.Thanks to the following for their contributions:
- @AshleyBilbrey
- @DPlayer234
- @DerPlayer2001
- @GnomedDev
- @KiloOscarSix
- @Legorooj
- @LikeLakers2
- @Nonanti
- @TapGhoul
- @archanyhm
- @arqunis
- @cheesycod
- @dis-archive
- @ivinjabraham
- @jamesbt365
- @mkrasnitski
- @nomanoma121
- @nwerosama
- @smolestcookie
- @valentinegb
Deprecations
- #3083 Deprecate
Member::distinct - #3090 Deprecate
ContentSafeOptions::show_discriminator - #3348 Deprecate creating a guild
Additions
- #2956 Add support for
PURCHASE_NOTIFICATIONmessage type - #3020 Add Consume Entitlement endpoint and missing fields for SKUs and Entitlements
- #3070 Add helper for extracting the guild ID out of an interaction
- #3092 Add
Message::message_snapshots - #3094 Implement
PartialEqandEqforActivityData - #3307 Support
?with_componentsin webhooks - #3319 Add
avatarfield toPartialMember - #3321 Make
ImageHashusable as key in std containers - #3362 Add support for fetching a single guild ban
- #3368 Add
bannertoMemberandPartialMember - #3374, #3435 Add soundboard support
- #3380 Add
flagstoEditWebhookMessageandEditInteractionResponse - #3394 Add
get_user_voice_stateendpoint - #3395 #3397 Add new AutoMod type for quarantined users, add AutoMod type for quarantined guild tag
- #3400 Add
resolveddata toComponentInteractionData - #3437 Add the
applied_tagsfield to ExecuteWebhook - #3452 Add guild role member counts endpoint
- #3456 Add
attachment_size_limitfield
Removals
- #3063 Remove broken
Message::super_react
Fixes
- #3059 Fix incorrect parameters for retrieving invites
- #3105 Fix Heartbeat gateway event handling
- #3377 Fix
Ordimpl forRole
Documentation improvements
- #3128 Update maximum limit of guilds returned by get_guilds to the new limit (200)
- #3408 Remove duplicate items from
Guild::featuresdocumentation - #3413 Fix documentation for
Guild::preferred_locale, it is only available to guilds with theCOMMUNITYfeature
Miscellaneous
Release notes
Open source →This compiles all of the changes that had accumulated since the prior release, and, unless another minor release is warranted, constitutes as the last release for the 0.12.x series.
We also extend our heartfelt thanks to [@jamesbt365], who passed away a few months ago. We deeply appreciate his code contributions, which started back in 2023, as well as his social contributions for helping people with using Serenity, Songbird, and Poise, on Github and/or Discord. We were saddened to hear that he's no longer with us, but we hope he rests well.
Thanks to the following for their contributions:
- [@AshleyBilbrey]
- [@DPlayer234]
- [@DerPlayer2001]
- [@GnomedDev]
- [@KiloOscarSix]
- [@Legorooj]
- [@LikeLakers2]
- [@Nonanti]
- [@TapGhoul]
- [@archanyhm]
- [@arqunis]
- [@cheesycod]
- [@dis-archive]
- [@ivinjabraham]
- [@jamesbt365]
- [@mkrasnitski]
- [@nomanoma121]
- [@nwerosama]
- [@smolestcookie]
- [@valentinegb]
Deprecations
- #3083 Deprecate
Member::distinct - #3090 Deprecate
ContentSafeOptions::show_discriminator - #3348 Deprecate creating a guild
Additions
- #2956 Add support for
PURCHASE_NOTIFICATIONmessage type - #3020 Add Consume Entitlement endpoint and missing fields for SKUs and Entitlements
- #3070 Add helper for extracting the guild ID out of an interaction
- #3092 Add
Message::message_snapshots - #3094 Implement
PartialEqandEqforActivityData - #3307 Support
?with_componentsin webhooks - #3319 Add
avatarfield toPartialMember - #3321 Make
ImageHashusable as key in std containers - #3362 Add support for fetching a single guild ban
- #3368 Add
bannertoMemberandPartialMember - #3374, #3435 Add soundboard support
- #3380 Add
flagstoEditWebhookMessageandEditInteractionResponse - #3394 Add
get_user_voice_stateendpoint - #3395 #3397 Add new AutoMod type for quarantined users, add AutoMod type for quarantined guild tag
- #3400 Add
resolveddata toComponentInteractionData - #3437 Add the
applied_tagsfield to ExecuteWebhook - #3452 Add guild role member counts endpoint
- #3456 Add
attachment_size_limitfield
Removals
- #3063 Remove broken
Message::super_react
Fixes
- #3059 Fix incorrect parameters for retrieving invites
- #3105 Fix Heartbeat gateway event handling
- #3377 Fix
Ordimpl forRole
Documentation improvements
- #3128 Update maximum limit of guilds returned by get_guilds to the new limit (200)
- #3408 Remove duplicate items from
Guild::featuresdocumentation - #3413 Fix documentation for
Guild::preferred_locale, it is only available to guilds with theCOMMUNITYfeature
Miscellaneous
-
0.12.415 Nov 2024Release notes
Open source →This is a hotfix release to fix broken behaviour of
Message::author_permissionsbefore it is relied on.Thanks to the following for their contributions:
Deprecations
- #3037 Permission methods which do not respect channel permission overrides are now deprecated, use the
_invariants.
Additions
- #3008
From<&User>has been added toCreateEmbedAuthor, to avoid consuming the user.
Fixes
- #3037
Message::author_permissionsnow respects permission overrides, as it is documented to. - #3039
Message::author_permissionsnow respectsSEND_MESSAGES_IN_THREADSwhen used in threads.
Documentation improvements
- #3038 Documentation for
Guild::threadshas been expanded.
Release notes
Open source →This is a hotfix release to fix broken behaviour of
Message::author_permissionsbefore it is relied on.Thanks to the following for their contributions:
- [@GnomedDev]
- [@jamesbt365]
Deprecations
- #3037 Permission methods which do not respect channel permission overrides are now deprecated, use the
_invariants.
Additions
- #3008
From<&User>has been added toCreateEmbedAuthor, to avoid consuming the user.
Fixes
- #3037
Message::author_permissionsnow respects permission overrides, as it is documented to. - #3039
Message::author_permissionsnow respectsSEND_MESSAGES_IN_THREADSwhen used in threads.
Documentation improvements
- #3038 Documentation for
Guild::threadshas been expanded.
- #3037 Permission methods which do not respect channel permission overrides are now deprecated, use the
-
0.12.312 Nov 2024Release notes
Open source →Thanks to the following for their contributions:
- @FabseGP
- @GnomedDev
- @HiccupEnthusiast
- @MarkusTheOrt
- @NiiightmareXD
- @ValgulNecron
- @gBasil
- @ivinjabraham
- @jamesbt365
- @limonfort
- @m1sk9
- @mkrasnitski
- @onzecki
- @rhgndf
- @stormofice
- @thmasq
- @thou-vow
Deprecations
- #2894
Message(Id)::link_ensuredcan be replaced byMessage(Id)::linkif recieved via event, orMessageId::linkif the message was recieved via a HTTP request. - #2905
CreateInteractionResponse::PremiumRequiredhas been deprecated and replaced with Premium Buttons. - #3030
GuildChannel::permissions_for_userhas been deprecated, use the newMessage::author_permissionshelper orGuild::user_permissions_in.
Additions
- #2891 Guild Incident message types have been added to MessageType.
- #2913
CreateButtonnow implementsFrom<Button>. - #2914
User::display_namehas been added, as users may have two different names now. - #2920 Support for Application Emojis has been added, getting rid of those "emoji servers" many bots required.
- #2905 Support for Premium Buttons has been added, which link to the store page of a chosen SKU.
- #2926 A method to get the role icon URL has been added.
- #2939 Some missing fields have been added to to
CurrentApplicationInfo. - #2946 Support for the Get Guild Role endpoint has been added.
- #2960 Support for the Get Sticker Pack by Id endpoint has been added.
- #2962 Some missing entries in
GuildMemberFlagshave been added. - #2950 The missing
USE_EXTERNAL_APPSpermission has been added. - #2987 A builder for the Get Entitlements endpoint has been added.
- #2996
MessageReferenceKindhas been added to start supporting forwarding. - #3001
{PartialGuild, Guild}::partial_member_permissionshas been added for more efficent permissions checking - #3013 Interaction responses can now send polls.
- #3018 User App support has been stablised, usable without
unstable_discord_api. - #3021 Support for Entry Point Commands has been added.
- #3030 A
Message::author_permissionshelper has been added, alongsidePermissions::dm_permissions.
Deserialisation Fixes
- #2887, #2893
Messages with reactions no longer fail to deserialize due to super reaction changes. - #2917 Application no longer fails to deserialize with
unstable_discord_api - #3032 Guilds with an @everyone role at position
-1no longer fail to deserialise.
General fixes
- #2886 A typo has been fixed in
GuildId::members_iterdocumentation. - #2906
CreateAttachmentdocumentation has been updated to be more consistent with other builders. - #2911
CreateEmbedAuthordocumentation can now spellembedcorrectly. - Pushed to Current
AuthorizingIntegrationOwnersis now usable, as the field was previously private. - #2945 (
Partial)Guild::member_permissionsis now usable without cache. - #2973
ChannelId::delete_messagesdocumentation has been expanded to document the single item case. - #2959 The rules for attachment names for local attachments in embeds have now been documented.
- #3005 The fields of
BulkBanResponsehave been made public. - #3006 The
bulk_banendpoint is now usable, previously unusable due toSendissues.
Release notes
Open source →Thanks to the following for their contributions:
- [@FabseGP]
- [@GnomedDev]
- [@HiccupEnthusiast]
- [@MarkusTheOrt]
- [@NiiightmareXD]
- [@ValgulNecron]
- [@gBasil]
- [@ivinjabraham]
- [@jamesbt365]
- [@limonfort]
- [@m1sk9]
- [@mkrasnitski]
- [@onzecki]
- [@rhgndf]
- [@stormofice]
- [@thmasq]
- [@thou-vow]
Deprecations
- #2894
Message(Id)::link_ensuredcan be replaced byMessage(Id)::linkif recieved via event, orMessageId::linkif the message was recieved via a HTTP request. - #2905
CreateInteractionResponse::PremiumRequiredhas been deprecated and replaced with Premium Buttons. - #3030
GuildChannel::permissions_for_userhas been deprecated, use the newMessage::author_permissionshelper orGuild::user_permissions_in.
Additions
- #2891 Guild Incident message types have been added to MessageType.
- #2913
CreateButtonnow implementsFrom<Button>. - #2914
User::display_namehas been added, as users may have two different names now. - #2920 Support for Application Emojis has been added, getting rid of those "emoji servers" many bots required.
- #2905 Support for Premium Buttons has been added, which link to the store page of a chosen SKU.
- #2926 A method to get the role icon URL has been added.
- #2939 Some missing fields have been added to to
CurrentApplicationInfo. - #2946 Support for the Get Guild Role endpoint has been added.
- #2960 Support for the Get Sticker Pack by Id endpoint has been added.
- #2962 Some missing entries in
GuildMemberFlagshave been added. - #2950 The missing
USE_EXTERNAL_APPSpermission has been added. - #2987 A builder for the Get Entitlements endpoint has been added.
- #2996
MessageReferenceKindhas been added to start supporting forwarding. - #3001
{PartialGuild, Guild}::partial_member_permissionshas been added for more efficent permissions checking - #3013 Interaction responses can now send polls.
- #3018 User App support has been stablised, usable without
unstable_discord_api. - #3021 Support for Entry Point Commands has been added.
- #3030 A
Message::author_permissionshelper has been added, alongsidePermissions::dm_permissions.
Deserialisation Fixes
- #2887, #2893 Messages with reactions no longer fail to deserialize due to super reaction changes.
- #2917 Application no longer fails to deserialize with
unstable_discord_api - #3032 Guilds with an @everyone role at position
-1no longer fail to deserialise.
General fixes
- #2886 A typo has been fixed in
GuildId::members_iterdocumentation. - #2906
CreateAttachmentdocumentation has been updated to be more consistent with other builders. - #2911
CreateEmbedAuthordocumentation can now spellembedcorrectly. - Pushed to Current
AuthorizingIntegrationOwnersis now usable, as the field was previously private. - #2945 (
Partial)Guild::member_permissionsis now usable without cache. - #2973
ChannelId::delete_messagesdocumentation has been expanded to document the single item case. - #2959 The rules for attachment names for local attachments in embeds have now been documented.
- #3005 The fields of
BulkBanResponsehave been made public. - #3006 The
bulk_banendpoint is now usable, previously unusable due toSendissues.
-
0.12.201 Jun 2024Release notes
Open source →Thanks to the following for their contributions:
Deprecations
Continuing with the deprecations started in 0.12.1, many more methods and fields have been deprecated in order to make an easier upgrade path to 0.13.
These deprecation messages include a migration path, it is recommended to go one by one using
cargo checkand migrate each warning to reduce the burden migrating to 0.13. Following is a list of the deprecation PRs and the justification for these changes.- (#2791) The
Channel::is_nsfwmethod was wrong, useless, and served better byGuildChannel::nsfw - (#2794) These cache methods needed arcane borrow checker dances internally, and obscure the simplicity of the cache.
- (#2816)
Member::highest_role_infois now strictly less powerful than the newGuild::member_highest_roleand can avoid a cache lookup if used correctly. - (#2825)
-
Guild::is_largeis less accurate thanGuild::large
-
Message::is_ownis super simple to implement yourself
-
Message::is_privatesimply checks ifMessage::guild_idisnone.
- (#2838)
Event::PresencesReplacedoes not exist, and is a relic from when serenity supported user accounts. - (#2861)
TeamMember::permissionsis always["*"], so is useless.
Other notable changes
- (#2790) Added
CreateMessage::enforce_nonce, to prevent sending duplicate messages. - (#2801) Added
EditProfile::banner, allowing banners to be set for bots. - (#2810) Added
ChannelId::get_thread_member. - (#2812) Added
Guild::partial_member_permissions_in, which can be used to avoid fetching aMemberin message events just to check permissions. - (#2819) Added
From<User>forCreateEmbedAuthor, setting the author name and icon to theUser's info. - (#2813) Added
UserId::direct_message, so you don't need a fullUserto direct message. - (#2834) Added
Http::default_allowed_mentionsto set theAllowedMentionsto be used with every request. - (#2830) Added
Guild(Id)::bulk_ban, allowing bulk banning without hitting rate limits. - (#2836) Added support for Message Polls, including reading and sending them.
- (#2807) Added support for User Apps, alllowing user-installable application commands.
- (#2882) Added support for super reactions.
- Many documentation fixes and other optimisations to improve memory and CPU usage.
Release notes
Open source →Thanks to the following for their contributions:
- [@bend-n]
- [@GnomedDev]
- [@jamesbt365]
- [@MidSpike]
- [@mkrasnitski]
- [@RegenJacob]
Deprecations
Continuing with the deprecations started in 0.12.1, many more methods and fields have been deprecated in order to make an easier upgrade path to 0.13.
These deprecation messages include a migration path, it is recommended to go one by one using
cargo checkand migrate each warning to reduce the burden migrating to 0.13. Following is a list of the deprecation PRs and the justification for these changes.- (#2791) The
Channel::is_nsfwmethod was wrong, useless, and served better byGuildChannel::nsfw - (#2794) These cache methods needed arcane borrow checker dances internally, and obscure the simplicity of the cache.
- (#2816)
Member::highest_role_infois now strictly less powerful than the newGuild::member_highest_roleand can avoid a cache lookup if used correctly. - (#2825)
-
Guild::is_largeis less accurate thanGuild::large
-
Message::is_ownis super simple to implement yourself
-
Message::is_privatesimply checks ifMessage::guild_idisnone.
- (#2838)
Event::PresencesReplacedoes not exist, and is a relic from when serenity supported user accounts. - (#2861)
TeamMember::permissionsis always["*"], so is useless.
Other notable changes
- (#2790) Added
CreateMessage::enforce_nonce, to prevent sending duplicate messages. - (#2801) Added
EditProfile::banner, allowing banners to be set for bots. - (#2810) Added
ChannelId::get_thread_member. - (#2812) Added
Guild::partial_member_permissions_in, which can be used to avoid fetching aMemberin message events just to check permissions. - (#2819) Added
From<User>forCreateEmbedAuthor, setting the author name and icon to theUser's info. - (#2813) Added
UserId::direct_message, so you don't need a fullUserto direct message. - (#2834) Added
Http::default_allowed_mentionsto set theAllowedMentionsto be used with every request. - (#2830) Added
Guild(Id)::bulk_ban, allowing bulk banning without hitting rate limits. - (#2836) Added support for Message Polls, including reading and sending them.
- (#2807) Added support for User Apps, alllowing user-installable application commands.
- (#2882) Added support for super reactions.
- Many documentation fixes and other optimisations to improve memory and CPU usage.
- (#2791) The
-
0.12.128 Feb 2024Release notes
Open source →Thanks to the following for their contributions:
- @arqunis
- @GnomedDev
- @jamesbt365
- @kangalio
- @logand22
- @mkrasnitski
- @SenseiHiraku
- @vaporoxx
- @vidhanio
- @Xaeroxe
- @yanorei32
Notable changes
In this release, the standard framework has been deprecated (#2733).
As Discord continues to endorse and evolve application commands (
/...commands, user commands, message commands, etc.), the standard framework becomes increasingly outdated. Bots are also steadily losing (and already have lost) access to contents of messages, making it difficult to build a prefix-only bot. Unless you plan on restricting your bot to only accept commands in DMs, allowing its presence in only fewer than 100 guilds, or presenting a reasonable justification to Discord for permission to continue using message contents, you should migrate to application commands. We recommend poise, which supports writing both prefix and application commands with a#[command]macro like the standard framework.Why not just update the framework?
Poise already exists and is better than the standard framework. Efforts should be directed at improving poise instead. To support application commands would require an overhaul of the standard framework, as they are special (for instance, Discord parses arguments on behalf of the bot and passes them as structured data, whereas for prefix commands, the bot must parse by itself).
Smaller, but still notable changes
- (#2621) Add a temporary cache for messages.
- (#2649) Deprecate
RoleId::to_role_cached- UseGuild::rolesinstead. - (#2726) Pack bitflags - Reduces alignments of
bitflags!types, resulting in a smaller memory footprint. - (#2696) Support attachments in forum posts.
- (#2560) Add support for monetization apis.
- (#2648) Deprecate inefficient emoji helpers - use the emoji methods on
guildid/guildinstead.
Release notes
Open source →Thanks to the following for their contributions:
- [@arqunis]
- [@GnomedDev]
- [@jamesbt365]
- [@kangalio]
- [@logand22]
- [@mkrasnitski]
- [@SenseiHiraku]
- [@vaporoxx]
- [@vidhanio]
- [@Xaeroxe]
- [@yanorei32]
Notable changes
In this release, the standard framework has been deprecated (#2733).
As Discord continues to endorse and evolve application commands (
/...commands, user commands, message commands, etc.), the standard framework becomes increasingly outdated. Bots are also steadily losing (and already have lost) access to contents of messages, making it difficult to build a prefix-only bot. Unless you plan on restricting your bot to only accept commands in DMs, allowing its presence in only fewer than 100 guilds, or presenting a reasonable justification to Discord for permission to continue using message contents, you should migrate to application commands. We recommend poise, which supports writing both prefix and application commands with a#[command]macro like the standard framework.Why not just update the framework?
Poise already exists and is better than the standard framework. Efforts should be directed at improving poise instead. To support application commands would require an overhaul of the standard framework, as they are special (for instance, Discord parses arguments on behalf of the bot and passes them as structured data, whereas for prefix commands, the bot must parse by itself).
Smaller, but still notable changes
- (#2621) Add a temporary cache for messages.
- (#2649) Deprecate
RoleId::to_role_cached- UseGuild::rolesinstead. - (#2726) Pack bitflags - Reduces alignments of
bitflags!types, resulting in a smaller memory footprint. - (#2696) Support attachments in forum posts.
- (#2560) Add support for monetization APIs.
- (#2648) Deprecate inefficient Emoji helpers - Use the emoji methods on
GuildId/Guildinstead.
-
0.12.027 Nov 2023Release notes
Open source →This release turned out to be one of serenity's largest ever, with well over 300 PRs in total! It contains quite a few major breaking changes to the API. Therefore, the changelog for this release also serves as a migration guide for users upgrading from the 0.11 series.
Thanks to the following for their contributions:
- @arqunis
- @alakhpc
- @AngelOnFira
- @Bloectasy
- @campbellcole
- @cheesycod
- @crivasr
- @darkyeg
- @fenhl
- @GnomedDev
- @jamesbt365
- @Joshument
- @kangalio
- @Kneemund
- @LaytonGB
- @marcantoinem
- @Miezhiko
- @Milo123459
- @mkrasnitski
- @nickelc
- @oSumAtrIX
- @Ruthenic
- @Sergiovan
- @skreborn
- @StckOverflw
- @tatsuya6502
- @tazz4843
- @vaporoxx
- @Xaeroxe
Builders
The closure-based API for constructing requests using the builder pattern has been ripped out and replaced. In place of closures, users must now pass in builder types directly. For example, in serenity 0.11, code like the following was very common:
let channel = guild .create_channel(&http, |c| c.name("my-test-channel").kind(ChannelType::Text)) .await?;
Now, users instead write the following code:
let builder = CreateChannel::new("my-test-channel").kind(ChannelType::Text); let channel = guild.create_channel(&http, builder).await?;
Or, inline like so:
let channel = guild .create_channel(&http, CreateChannel::new("my-test-channel").kind(ChannelType::Text)) .await?;
Note that in this particular example, the channel name is now a mandatory field that must be passed in when constructing the builder. Mutating the builder with subsequent calls to
CreateChannel::namewill change the underlying value. Additionally, all methods on builders now takemut selfand returnSelf, instead of taking and returning&mut self/&mut Self. This allows for explicit construction as in the second example above. Also, builders no longer wrap apub HashMap<&'static str, T>; the hashmap has been flattened into concrete private fields.Some benefits to this new approach to builders are:
- Because every closure has a type unique to it, each call to a method taking a closure would be monomorphized separately, resulting in binary bloat. This is no longer the case.
- Builders can be constructed once and then cloned and re-used multiple times.
- Enforcement of field requirements (as dictated by the Discord API docs) provides compile-time request validation.
Attachments
- The
AttachmentTypeenum has been replaced with aCreateAttachmentbuilder struct. This struct has thefile,path, andurlconstructors that eagerly evaluate the data passed to them -CreateAttachmentsimply stores the resulting raw data. This is in contrast toAttachmentTypewhich lazily carried filepaths/urls with it, and haddataandfilenamemethods for resolving them. Additionally, theCreateAttachment::to_base64method can be used to manually encode an attachment if needed. - A new
EditAttachmentsbuilder struct has been added for use with theattachmentsmethod on theEditMessage,EditWebhookMessage, andEditInteractionResponsebuilders. This new builder provides finer control when editing a message's existing attachments or uploading additional ones. Also, the following methods have been renamed to more accurately reflect their behavior:
serenity v0.11 serenity v0.12 EditMessage::attachmentEditMessage::new_attachmentEditMessage::add_existing_attachmentEditMessage::keep_existing_attachmentEditWebhookMessage::clear_existing_attachmentsEditWebhookMessage::clear_attachmentsEditInteractionResponse::clear_existing_attachmentsEditInteractionResponse::clear_attachmentsCollectors
Collectors have been redesigned and simplified at no cost to expressibility. There is now a generic
collector::collectfunction which takes a closure as argument, letting you filter events as they stream in.- The specific collectors (
ComponentInteractionCollector,ModalInteractionCollector,MessageCollector, andReactionCollector) are simply convenience structs that wrap this underlying function. EventCollectoris now deprecated, as its use usually involved anti-patterns around fallibility. However, its functionality can still be replicated usingcollector::collect. See example 10 for more details.- The
RelatedIdandRelatedIdsForEventTypetypes have been removed as they were only used byEventCollector. Methods for retrieving them from events have also been removed; if users wish to extract "related" ids from an event, they should do so directly from the event's fields. The removed methods are the following:Event::user_idEvent::guild_idEvent::channel_idEvent::message_idEventType::related_ids
Commands
In an effort to shorten long names and make import paths less unwieldy, Serenity now uses
commandinstead ofapplication_commandin all places, except for thePermissions::USE_APPLICATION_COMMANDSconstant. This includes methods on theHttp,GuildId,Guild,PartialGuild, andCommandtypes, as well as a few other miscellaneous places:serenity v0.11 serenity v0.12 Http::*_{global,guild}_application_command*Http::*_{global,guild}_command*{GuildId,Guild,PartialGuild}::*_application_command*{GuildId,Guild,PartialGuild}::*_command*Command::*_global_application_command*Command::*_global_command*Interaction::application_commandInteraction::commandEventHandler::application_command_permissions_updateEventHandler::command_permissions_updateRoute::ApplicationCommand*Route::Command*Permissions::use_application_commandsPermissions::use_commandsAdditionally, the following command types have been renamed:
serenity v0.11 serenity v0.12 CreateApplicationCommandCreateCommandCreateApplicationCommandOptionCreateCommandOptionCreateApplicationCommandPermissionDataCreateCommandPermissionCreateApplicationCommandPermissionsDataEditCommandPermissionsCommandPermissionCommandPermissionsCommandPermissionDataCommandPermissionFurthermore, the methods on
CreateCommandPermission, such asnew,kind, etc. have been replaced with constructors for each type of permission, e.g.role,user,channel, etc., to avoid a possible mismatch betweenkindand the id that gets passed in.Finally, the
{GuildId,Guild,PartialGuild}::create_command_permissionmethod has been renamed toedit_command_permissionto more accurately reflect its behavior.Cache
- Cache methods now return a
CacheReftype that wraps a reference into the cache. Other methods that returned a map, now return a wrapper type around a reference to the map, with a limited API to prevent accidental deadlocks. This all helps reduce the number of clones when querying the cache. Those wishing to replicate the old behavior can simply call.clone()on the return type to obtain the wrapped data. CacheSettingshas new fieldstime_to_live,cache_guilds,cache_channels, andcache_users, allowing cache configuration on systems with memory requirements; whereas previously, memory-constrained systems were forced to disable caching altogether.- Caching for
PrivateChannels (aka DM channels) has been removed, as they are never sent across the gateway by Discord. Therefore, theCache::{private_channel, private_channels}methods have been removed, andCache::guild_channelhas been renamed to justCache::channel. Additionally, some uses of theChannelenum in return types have been replaced with eitherGuildChannelorPrivateChannelas seen fit.
IDs
All
*Idtypes have had their internal representations made private. Therefore, the API has changed as follows:serenity v0.11 serenity v0.12 ExampleId(12345)ExampleId::new(12345)example_id.as_u64()example_id.get()Note that all
*Idtypes now implementInto<u64>andInto<i64>. Additionally, attempting to instantiate an id with a value of0will panic.Also, the implementations of
FromStrfor theUserId,RoleId, andChannelIdtypes now expect an integer rather than a mention string. The following table shows the new expected input strings:serenity v0.11 serenity v0.12 ChannelId<#81384788765712384>81384788765712384RoleId<@&136107769680887808>136107769680887808UserId<@114941315417899012>or<@!114941315417899012>114941315417899012Users wishing to parse mentions should either parse into a
Mentionobject, or use theutils::{parse_user_mention, parse_role_mention, parse_channel_mention}methods.Interactions
The various interaction types have been renamed as follows:
serenity v0.11 serenity v0.12 ApplicationCommandInteractionCommandInteractionMessageComponentInteractionComponentInteractionModalSubmitInteractionModalInteractionMethod names on interaction types have been shortened in the following way:
serenity v0.11 serenity v0.12 create_interaction_responsecreate_responsecreate_followup_messagecreate_followupdelete_original_interaction_responsedelete_responsedelete_followup_messagedelete_followupedit_original_interaction_responseedit_responseedit_followup_messageedit_followupget_interaction_responseget_responseget_followup_messageget_followupAutocompleteInteractionhas been merged intoCommandInteraction, along with its corresponding methods.- The
kindfield has been removed from each of the interaction structs. - A
quick_modalmethod has been added toCommandInteractionandComponentInteraction. See the docs for more details.
Framework
The standard framework is now configurable at runtime, as the
configuremethod now takesselfby reference. In line with the builder changes, theConfigurationandBucketBuilderbuilders are no longer closure-based and must be passed in directly. Also, theFrameworktrait has been reworked to accomodate more use cases than just text commands:- The
dispatchmethod now takes aFullEventas argument instead of just aMessage. This enum contains all the data that is passed to theEventHandler. - An optional
initmethod has been added, that allows for more complex framework initialization, which can include executing HTTP requests, or accessing cache or shard data.
As a result, the trait now accomodates alternative frameworks more easily, such as poise.
Gateway
- Renamed
WsStreamtoWsClient. - The
ShardManagerMonitorandShardManagerMessagetypes have been removed. Their functionality has been replicated via methods directly onShardManager. Any fields with typeSender<ShardManagerMessage>, as well as theClient::shard_managerfield, have had their types changed toArc<ShardManager>. The new methods onShardManagerare the following:return_with_valueshutdown_finishedrestart_shardupdate_shard_latency_and_stage
- The
ShardClientMessageandInterMessageenums were deemed redundant wrappers aroundShardRunnerMessageand removed - users should useShardRunnerMessagedirectly instead. - The
ShardManagerErrortype is removed in favor ofGatewayError. - Serenity's handling of gateway heartbeats has been made more accurate and type safe as follows:
- Removed
Shard::heartbeat_instants. Users should instead use thelast_heartbeat_{sent,ack}methods, which now returnOption<Instant>instead ofOption<&Instant>. - Changed
Shard::heartbeat_intervalto returnOption<Duration>instead ofOption<u64>. - Rename
Shard::check_heartbeattodo_heartbeat.
- Removed
ShardMessenger::newnow takes&ShardRunneras argument instead ofSender<ShardRunnerMessage>.- Removed the
ShardRunnerMessage::AddCollectorvariant in favor of theShardMessenger::add_collectormethod. This method adds the collectors immediately, whereasShardRunnerMessageis polled periodically in a loop - this could occasionally cause collectors to drop the first event they received. - All remaining types found at
serenity::client::bridge::{gateway,voice}::*have been moved intoserenity::gateway. They are now gated behind thegatewayfeature instead of theclientfeature, however most users use these features in conjunction, and so should not see a change in required-enabled features.
MSRV
Serenity now uses Rust edition 2021, with an MSRV of Rust 1.74.
Miscellaneous
Added
- #1923, #2465 - Add a
thread_idparameter toHttp::{get,edit,delete}_webhook_message,Http::execute_webhook}, as well asWebhook::{get,delete}_message. - #2104, #2105 - Add an
audit_log_reasonparameter to manyHttpmethods and builder structs. - #2164 - Add
EventHandler::shards_readymethod. - #2186, #2201 - Add support for having a bot interactions endpoint URL.
- #2215 - Implement
Defaultfor many model types. - #2233 - Add
buttonandselect_menumethods to the following builders:CreateInteractionResponseMessageCreateInteractionResponseFollowupEditInteractionResponseCreateMessageEditMessageEditWebhookMessageExecuteWebhook
- #2247, #2357, #2385 - Add support for forum channels and creating forum posts using
ChannelId::create_forum_postandGuildChannel::create_forum_post. - #2257 - Add support for multiple event handlers by replacing the
event_handlerandraw_event_handlerfields with pluralizedevent_handlersandraw_event_handlersin the following structs:ShardManagerOptionsShardQueuerShardRunnerShardRunnerOptionsClientBuilder
- #2273, #2367 - Add events
ReactionRemoveEmojiandGuildAuditLogEntryCreate. - #2276 - Add support for automod regex patterns.
- #2297 - Add the
serenity::allmodule, which re-exports most public items in the crate. - #2336 - Add a
CreateButton::custom_idmethod. - #2369 - Add support for editing a guild's MFA level using
{GuildId, Guild, PartialGuild}::edit_mfa_level. - #2391 - Add attachments support to the
EditWebhookMessageendpoint by adding anew_attachmentsparameter toHttp::edit_webhook_message, as well as the following methods to theEditWebhookMessagebuilder:attachmentadd_existing_attachmentremove_existing_attachment
- #2415, #2461 - Add support for Discord's new usernames by adding the
User::global_namefield, and by making discriminators on usernames optional and non-zero. In particular, thePresenceUser::discriminatorandUser::discriminatorfields are now of typeOption<NonZeroU16>. - #2487 - Add support for the Get Current User Guild Member endpoint with the
{GuildId,Guild,PartialGuild}::current_user_membermethod. - #2503 - Add support for setting custom activity statuses.
- #2520 - Add the
User::static_facemethod, mirroringUser::face. - #2535 - Add pagination support to the Get Guild Bans endpoint.
- #2565 - Add support for the
VOICE_CHANNEL_STATUS_UPDATEgateway event. - #2576 - Add a
GuildId::everyone_rolemethod. - #2588 - Add audit log events for creator monetization.
- #2595 - Add the
CREATE_EVENTSandCREATE_GUILD_EXPRESSIONSpermissions, and renameMANAGE_EMOJIS_AND_STICKERStoMANAGE_GUILD_EXPRESSIONS(the old name is still present but deprecated). - #2600 - Add the
FormattedTimestamputility struct for representing a combination of a timestamp and a formatting style. - #2601 - Add support for more Discord subdomains in
utils::argument_convert::parse_message_url. - #2614 - Add
HashtoTimestamp's derive list. - #2592 - Add experimental
typesizesupport. - #2618 - Implement
From<Into<String>>forAutocompleteChoice.
Changed
- #1896 -
Request::body_refnow returnsOption<&T>instead of&Option<&T>. - #1897, #2350 -
Typing::stopnow returnsboolinstead ofOption<()>. Also,Typing::startand any wrapper methods are now infallible. - #1922, #1940, #2090 - The following methods are no longer
async:ChannelId::nameContext::*Guild::{members_starting_with, members_containing, members_username_containing, members_nick_containing}Guild::default_channelPartialGuild::greater_member_hierarchyShardManager::newUserId::to_user_cached
- #1929 - Unbox the
Error::Httpvariant. - #1934 - Change
Guild::memberto returnCow<'_, Member>instead of justMember. - #1937 - Change all fields of
ShardManagerOptionsto be owned (Arcis cheap to clone). - #1947 - Change methods related to pruning to take and return
u8. - #1963 - Change
RequestBuilder::bodyfromOption<&[u8]>toOption<Vec<u8>>. - #1976 - Make
MessageInteractionnon-exhaustive, and add amemberfield. - #1977 - Rename
Permissions::USE_SLASH_COMMANDStoUSE_APPLICATION_COMMANDS. - #1980 - Rename
constants::OpCodetoOpcode, and the same forvoice_model::OpCode. - #1984 - Introduce
ShardInfofor tracking Shard ids, and change ids fromu64tou32. - #1990 - Change the
Message::noncefield to a customNonceenum instead of aserde_json::Value. - #1999 - Make
MembershipState,ScheduledEventStatus, andScheduledEventTypenon-exhaustive. - #2005 - Change
MessageActivityKindvariants to use CamelCase instead of ALL_CAPS. - #2007, #2018 - Rework presence setting and storing as follows:
- Replace
CurrentPresencewith aPresenceDatastruct. - Use
ActivityDatain place ofActivityfor setting the current presence. - Change the various
set_activitymethods to take anOption<ActivityData>to allow for clearing the current presence by passing inNone. - Add support for setting a presence when first identifying to the gateway by adding presence methods to
ClientBuilder, and adding an optionalpresenceparameter toShard::new.
- Replace
- #2008 - Unknown values for enum variants are now preserved for debugging purposes. Any
Unknownvariants on enums are now changed toUnknown(u8). Also, thenummethod for those enums is removed; users should callu8::frominstead. - #2017 - Change
Member::editto edit in place, and returnResult<()>instead ofResult<Message>. - #2023, #2170, #2459 - Use Id types everywhere instead of
u32,u64, orNonZeroU64. - #2030 - Change
{GuildId, Guild, PartialGuild}::deleteto returnResult<()>. - #2032 - Replace
impl From<String> for Timestampwithimpl TryFrom<&str>. - #2047 - The following functions are now
const:LightMethod::reqwest_methodRatelimit::{limit, remaining, reset, reset_after}RequestBuilder::newChannel::{id, position, name}Error::is_cache_errEvent::event_typeEventType::nameGatewayIntents::*Permissions::*
- #2052 - Change the
CommonFilterOptions::{filter_limit, collect_limit}fields fromu32toNonZeroU32. - #2054 - Change the
GuildChannel::message_countfield fromOption<u8>toOption<u32>. - #2073 - Move the
serenity::utils::colourmodule intoserenity::model. - #2127 - Replace
CreateAllowedMentions::parsewithall_users,all_roles, andeveryonemethods. - #2139 - Change
ChannelId::nameto returnResult<String>instead ofOption<String>. - #2144 - Don't offer different function signatures for
EventHandlermethods if thecachefeature is disabled. Relevant cache-dependant data is now passed in usingOption. - #2149 - Change channel positions, role positions, and bitrates to always be
u32. - #2173 - Replace the implementation of
FutureforClientBuilderwithIntoFuture. - #2173 - Make
ClientBuilder::{get_token, get_type_map, get_cache_settings}infallible. - #2194 - Change
CacheUpdate::OutputforChannelDeleteEventfrom()toVec<Message>. - #2205 - Wrap the following large model fields in
Box:CommandInteraction::memberComponentInteraction::messageModalInteraction::messageMessage::memberMessage::interaction
- #2224 - Introduce
CreateSelectMenuKindandComponentInteractionDataKindenums to better enforce well-formation of requests. - #2244 - Flatten the
httpmodule by re-exporting all types found in submodules at the top level and removinng access to the submodules themselves. - #2277 - Make
ErrorResponsenon-exhaustive, change theurlfield fromUrltoString, and add amethodfield. - #2285 - Wrap the
Http::ratelimiterfield inOption, and remove the correspondingratelimiter_disabledfield. - #2285 - Add an optional
reasonparameter toHttp::{ban, kick}, and removeHttp::{ban,kick}_with_reason. - #2288 - Merge the
RouteandRouteInfoenums, and addmethodandparamsfields to theRequeststruct. - #2310 - Flatten the
model::applicationmodule in the same way thehttpmodule was flattened. - #2327 - Change the
ThreadMembersUpdateEvent::member_countfield fromu8toi16. - #2393 - Change the following field and enum variant types:
GuildUpdateEvent::guildfromPartialGuildtoGuildReaction::memberfromOption<PartialMember>toMemberIntegration::guild_idfromGuildIdtoOption<GuildId>IncidentUpdate::statusfromIncidentStatustoString(IncidentStatusis also removed){Guild,PartialGuild}::premium_subscription_countfromu64toOption<u64>InputText::valuefromStringtoOption<String>CurrentApplicationInfo::ownerfromUsertoOption<User>ScheduledEventMetadata::locationfromStringtoOption<String>Trigger::KeywordPresetfrom a tuple variant to a struct variant
- #2393 - Rename the following field and enum variants:
Incident::short_linktoshortlinkThreadDeleteEvent::channels_idtochannel_idsThreadMembersUpdateEvent::removed_members_idstoremoved_member_idsInviteTargetType::EmmbeddedApplicationtoEmbeddedApplicationScope::RelactionshipsReadtoRelationshipsRead
- #2393, #2418 - Change
CurrentUserto be a newtype aroundUser, implement theDereftrait, and remove theguilds,invite_url, andinvite_url_with_oauth2_scopesmethods. The only method now unique toCurrentUserisedit. All other methods are available to call via deref coercion. - #2397 - Make the following
modeltypes non-exhaustive:model::application::{Interaction, ActionRow, Button, SelectMenu, SelectMenuOption, InputText}model::application::{PartialCurrentApplicationInfo, Team, TeamMember, InstallParams}model::channel::{PartialGuildChannel, ChannelMention}model::gateway::{ActivityEmoji, ClientStatus}model::guild::{Ban, GuildPrune, GuildInfo, UnavailableGuild, GuildWelcomeScreen}model::guild::{ScheduledEventMetadata, ScheduledEventUser}model::guild::automod::{Rule, TriggerMetadata, Action, ActionExecution}model::misc::EmojiIdentifier
- #2428 - Change
CacheUpdate::OutputforChannelUpdateEventfrom()toChannel. Also, make{Guild,PartialGuild}::user_permissions_ininfallible and changeError::InvalidPermissionsinto a struct variant containing both the therequiredpermissions as well as thepresentpermissions. - #2460 - Wrap secret tokens in
secrecy::SecretStringto prevent them being leaked throughDebugimplementations, and so that they are zeroed when dropped. - #2462, #2467, #2586 - Change image hashes from
Strings to a dedicatedImageHashtype which saves on space by storing the hash directly as bytes. - #2464 - Optimize the size of many model structs by changing the types of their fields:
- All
rate_limit_per_userfields are now counted using au16. - Channel
positionfields now hold au16. - Role
posititionfields now hold au16. - All
auto_archive_positionfields are now an enumAutoArchivePosition. - All
afk_timeoutfields are now an enumAfkTimeout. - Replace the
DefaultReactionstruct with aForumEmojienum. - The
Sticker::sort_valuefield is now anOption<u16>. - The
min_valuesandmax_valuesfields for Select Menus now hold au8. - The
max_ageinvite field now holds au32. - The
max_usesinvite field now holds au8. - The
ActivityPartycurrent and maximum size are now of typeu32. - The
Ready::versionfield is now au8. - The
min_lengthandmax_lengthfields for Input Text components now hold au16. - The
mention_total_limitfield for automod triggers now holds au8. - The
RoleSubscriptionData::total_months_subscribedfield is now au16.
- All
- #2470 - Rename
{Http,ChannelId,GuildChannel}::create_public_threadtocreate_thread_from_message, and similarly renamecreate_private_threadtocreate_thread, to more accurately reflect their behavior. The corresponding endpoints have also been renamed fromChannelPublicThreads/ChannelPrivateThreads, toChannelMessageThreads/ChannelThreads, respectively. - #2519 - Make stage channels text-based.
- #2551 - The
ThreadDeleteevent now provides the fullGuildChannelobject for the deleted thread if it is present in the cache. - #2553 - The
ThreadUpdateevent now provides the old thread'sGuildChannelobject if it is present in the cache. - #2554 - The
Webhook::source_guildandWebhook::source_channelfields have had their types changed fromOption<PartialGuild>/Option<PartialChannel>to their ownOption<WebhookGuild>/Option<WebhookChannel>types in order to avoid deserialization errors. These new types contain very few fields, but have methods for converting intoPartialGuilds orChannels by querying the API. - #2569 - Replaced the
json::preludemodule with public wrapper functions that abstract over bothserde_jsonandsimd-json. - #2593 - Rename
GatewayIntents::GUILD_BANStoGUILD_MODERATION(the old name is still present but is deprecated). - #2598 - Change
CreateInteractionResponseMessage::flagsto takeInteractionResponseFlagsinstead ofMessageFlags. - #2609 - Split parts of
ThreadMemberintoPartialThreadMember. - #2622 - Implement role addition/removal using dedicated endpoints.
- #2623 - Use dedicated types for
GuildId::audit_logs. - #2625 - Change
Guild::members_with_statusto returnimpl Iterator<Item = &Member>instead ofVec<Member>.
Removed
- #1864, #1902 - Remove all deprecated types, fields, and methods.
- #1885 - Remove the lifetime parameter on
model::application::ResolvedTarget. - #1927 - Remove
model::guild::GuildContainer. - #1938 - Remove
EventHandler::{guild_unavailable, unknown}. - #1959 - Remove
EditProfile::{email, password, new_password}. - #2034 - Remove
serenity::json::from_number. Users should call.into()instead. - #2128 - Remove the
Channel::Categoryvariant, asGuildChannel::kindcan already beChannelType::Category. However, theChannel::categorymethod is still available. - #2161 - Remove the
Mention::Emojivariant. - #2162 - Remove
serenity::token::parse- usetoken::validateinstead. - #2246 - Remove the
absolute_ratelimitsfeature and replace it with a runtime configuration option. - #2308 - Remove
CacheAndHttp, and inline it as separatecacheandhttpfields in the following structs:ShardManagerOptionsShardQueuerShardRunnerShardRunnerOptionsClient
- #2393 - Remove non-existent fields and enum variants that Discord no longer sends back from the API. The following fields have been removed:
VoiceServerUpdateEvent::channel_idResumedEvent::channel_idReady::{presences, private_channels, trace}InviteGuild::{text_channel_count, voice_channel_count}VoiceState::tokenIncidentUpdate::affected_components(and also theAffectedComponentstruct)Maintenance::{description, stop, start}SelectMenu::valuesMessageUpdateEvent::{author, timestamp, nonce, kind, stickers}PartialGuild::{owner, permissions}InviteTargetType::NormalTrigger::HarmfulLink
- #2424 - Remove the
FromStrAndCacheandStrExttraits. Also removesmodel::{ChannelParseError,RoleParseError}, which conflicted with types of the same name fromutils. - #2429 - Remove the useless re-exports of the various submodules of
modelfrom themodel::prelude, and don't re-export types from other libraries, likeDeserializeorHashMap. - #2466 - Remove the
DefaultAvatarenum. - #2531 - The following bitflag types no longer implement
PartialOrd/Ord:- ActivityFlags
- ApplicationFlags
- ChannelFlags
- GatewayIntents
- GuildMemberFlags
- InteractionResponseFlags
- MessageFlags
- Permissions
- SpeakingState
- SystemChannelFlags
- ThreadMemberFlags
- UserPublicFlags
- #2559 - Remove the
EventTypeenum. Instead ofEvent::event_type().name(), users should just callEvent::name. - #2578 - Remove the
PingInteraction::guild_localefield.
Release notes
Open source →This release turned out to be one of serenity's largest ever, with well over 300 PRs in total! It contains quite a few major breaking changes to the API. Therefore, the changelog for this release also serves as a migration guide for users upgrading from the 0.11 series.
Thanks to the following for their contributions:
- [@arqunis]
- [@alakhpc]
- [@AngelOnFira]
- [@Bloectasy]
- [@campbellcole]
- [@cheesycod]
- [@crivasr]
- [@darkyeg]
- [@fenhl]
- [@GnomedDev]
- [@jamesbt365]
- [@Joshument]
- [@kangalio]
- [@Kneemund]
- [@LaytonGB]
- [@marcantoinem]
- [@Miezhiko]
- [@Milo123459]
- [@mkrasnitski]
- [@nickelc]
- [@oSumAtrIX]
- [@Ruthenic]
- [@Sergiovan]
- [@skreborn]
- [@StckOverflw]
- [@tatsuya6502]
- [@tazz4843]
- [@vaporoxx]
- [@Xaeroxe]
Builders
The closure-based API for constructing requests using the builder pattern has been ripped out and replaced. In place of closures, users must now pass in builder types directly. For example, in serenity 0.11, code like the following was very common:
let channel = guild .create_channel(&http, |c| c.name("my-test-channel").kind(ChannelType::Text)) .await?;Now, users instead write the following code:
let builder = CreateChannel::new("my-test-channel").kind(ChannelType::Text); let channel = guild.create_channel(&http, builder).await?;Or, inline like so:
let channel = guild .create_channel(&http, CreateChannel::new("my-test-channel").kind(ChannelType::Text)) .await?;Note that in this particular example, the channel name is now a mandatory field that must be passed in when constructing the builder. Mutating the builder with subsequent calls to
CreateChannel::namewill change the underlying value. Additionally, all methods on builders now takemut selfand returnSelf, instead of taking and returning&mut self/&mut Self. This allows for explicit construction as in the second example above. Also, builders no longer wrap apub HashMap<&'static str, T>; the hashmap has been flattened into concrete private fields.Some benefits to this new approach to builders are:
- Because every closure has a type unique to it, each call to a method taking a closure would be monomorphized separately, resulting in binary bloat. This is no longer the case.
- Builders can be constructed once and then cloned and re-used multiple times.
- Enforcement of field requirements (as dictated by the Discord API docs) provides compile-time request validation.
Attachments
- The
AttachmentTypeenum has been replaced with aCreateAttachmentbuilder struct. This struct has thefile,path, andurlconstructors that eagerly evaluate the data passed to them -CreateAttachmentsimply stores the resulting raw data. This is in contrast toAttachmentTypewhich lazily carried filepaths/urls with it, and haddataandfilenamemethods for resolving them. Additionally, theCreateAttachment::to_base64method can be used to manually encode an attachment if needed. - A new
EditAttachmentsbuilder struct has been added for use with theattachmentsmethod on theEditMessage,EditWebhookMessage, andEditInteractionResponsebuilders. This new builder provides finer control when editing a message's existing attachments or uploading additional ones. Also, the following methods have been renamed to more accurately reflect their behavior:
serenity v0.11 serenity v0.12 EditMessage::attachmentEditMessage::new_attachmentEditMessage::add_existing_attachmentEditMessage::keep_existing_attachmentEditWebhookMessage::clear_existing_attachmentsEditWebhookMessage::clear_attachmentsEditInteractionResponse::clear_existing_attachmentsEditInteractionResponse::clear_attachmentsCollectors
Collectors have been redesigned and simplified at no cost to expressibility. There is now a generic
collector::collectfunction which takes a closure as argument, letting you filter events as they stream in.- The specific collectors (
ComponentInteractionCollector,ModalInteractionCollector,MessageCollector, andReactionCollector) are simply convenience structs that wrap this underlying function. EventCollectoris now deprecated, as its use usually involved anti-patterns around fallibility. However, its functionality can still be replicated usingcollector::collect. See example 10 for more details.- The
RelatedIdandRelatedIdsForEventTypetypes have been removed as they were only used byEventCollector. Methods for retrieving them from events have also been removed; if users wish to extract "related" ids from an event, they should do so directly from the event's fields. The removed methods are the following:Event::user_idEvent::guild_idEvent::channel_idEvent::message_idEventType::related_ids
Commands
In an effort to shorten long names and make import paths less unwieldy, Serenity now uses
commandinstead ofapplication_commandin all places, except for thePermissions::USE_APPLICATION_COMMANDSconstant. This includes methods on theHttp,GuildId,Guild,PartialGuild, andCommandtypes, as well as a few other miscellaneous places:serenity v0.11 serenity v0.12 Http::*_{global,guild}_application_command*Http::*_{global,guild}_command*{GuildId,Guild,PartialGuild}::*_application_command*{GuildId,Guild,PartialGuild}::*_command*Command::*_global_application_command*Command::*_global_command*Interaction::application_commandInteraction::commandEventHandler::application_command_permissions_updateEventHandler::command_permissions_updateRoute::ApplicationCommand*Route::Command*Permissions::use_application_commandsPermissions::use_commandsAdditionally, the following command types have been renamed:
serenity v0.11 serenity v0.12 CreateApplicationCommandCreateCommandCreateApplicationCommandOptionCreateCommandOptionCreateApplicationCommandPermissionDataCreateCommandPermissionCreateApplicationCommandPermissionsDataEditCommandPermissionsCommandPermissionCommandPermissionsCommandPermissionDataCommandPermissionFurthermore, the methods on
CreateCommandPermission, such asnew,kind, etc. have been replaced with constructors for each type of permission, e.g.role,user,channel, etc., to avoid a possible mismatch betweenkindand the id that gets passed in.Finally, the
{GuildId,Guild,PartialGuild}::create_command_permissionmethod has been renamed toedit_command_permissionto more accurately reflect its behavior.Cache
- Cache methods now return a
CacheReftype that wraps a reference into the cache. Other methods that returned a map, now return a wrapper type around a reference to the map, with a limited API to prevent accidental deadlocks. This all helps reduce the number of clones when querying the cache. Those wishing to replicate the old behavior can simply call.clone()on the return type to obtain the wrapped data. CacheSettingshas new fieldstime_to_live,cache_guilds,cache_channels, andcache_users, allowing cache configuration on systems with memory requirements; whereas previously, memory-constrained systems were forced to disable caching altogether.- Caching for
PrivateChannels (aka DM channels) has been removed, as they are never sent across the gateway by Discord. Therefore, theCache::{private_channel, private_channels}methods have been removed, andCache::guild_channelhas been renamed to justCache::channel. Additionally, some uses of theChannelenum in return types have been replaced with eitherGuildChannelorPrivateChannelas seen fit.
IDs
All
*Idtypes have had their internal representations made private. Therefore, the API has changed as follows:serenity v0.11 serenity v0.12 ExampleId(12345)ExampleId::new(12345)example_id.as_u64()example_id.get()Note that all
*Idtypes now implementInto<u64>andInto<i64>. Additionally, attempting to instantiate an id with a value of0will panic.Also, the implementations of
FromStrfor theUserId,RoleId, andChannelIdtypes now expect an integer rather than a mention string. The following table shows the new expected input strings:serenity v0.11 serenity v0.12 ChannelId<#81384788765712384>81384788765712384RoleId<@&136107769680887808>136107769680887808UserId<@114941315417899012>or<@!114941315417899012>114941315417899012Users wishing to parse mentions should either parse into a
Mentionobject, or use theutils::{parse_user_mention, parse_role_mention, parse_channel_mention}methods.Interactions
The various interaction types have been renamed as follows:
serenity v0.11 serenity v0.12 ApplicationCommandInteractionCommandInteractionMessageComponentInteractionComponentInteractionModalSubmitInteractionModalInteractionMethod names on interaction types have been shortened in the following way:
serenity v0.11 serenity v0.12 create_interaction_responsecreate_responsecreate_followup_messagecreate_followupdelete_original_interaction_responsedelete_responsedelete_followup_messagedelete_followupedit_original_interaction_responseedit_responseedit_followup_messageedit_followupget_interaction_responseget_responseget_followup_messageget_followupAutocompleteInteractionhas been merged intoCommandInteraction, along with its corresponding methods.- The
kindfield has been removed from each of the interaction structs. - A
quick_modalmethod has been added toCommandInteractionandComponentInteraction. See the docs for more details.
Framework
The standard framework is now configurable at runtime, as the
configuremethod now takesselfby reference. In line with the builder changes, theConfigurationandBucketBuilderbuilders are no longer closure-based and must be passed in directly. Also, theFrameworktrait has been reworked to accomodate more use cases than just text commands:- The
dispatchmethod now takes aFullEventas argument instead of just aMessage. This enum contains all the data that is passed to theEventHandler. - An optional
initmethod has been added, that allows for more complex framework initialization, which can include executing HTTP requests, or accessing cache or shard data.
As a result, the trait now accomodates alternative frameworks more easily, such as poise.
Gateway
- Renamed
WsStreamtoWsClient. - The
ShardManagerMonitorandShardManagerMessagetypes have been removed. Their functionality has been replicated via methods directly onShardManager. Any fields with typeSender<ShardManagerMessage>, as well as theClient::shard_managerfield, have had their types changed toArc<ShardManager>. The new methods onShardManagerare the following:return_with_valueshutdown_finishedrestart_shardupdate_shard_latency_and_stage
- The
ShardClientMessageandInterMessageenums were deemed redundant wrappers aroundShardRunnerMessageand removed - users should useShardRunnerMessagedirectly instead. - The
ShardManagerErrortype is removed in favor ofGatewayError. - Serenity's handling of gateway heartbeats has been made more accurate and type safe as follows:
- Removed
Shard::heartbeat_instants. Users should instead use thelast_heartbeat_{sent,ack}methods, which now returnOption<Instant>instead ofOption<&Instant>. - Changed
Shard::heartbeat_intervalto returnOption<Duration>instead ofOption<u64>. - Rename
Shard::check_heartbeattodo_heartbeat.
- Removed
ShardMessenger::newnow takes&ShardRunneras argument instead ofSender<ShardRunnerMessage>.- Removed the
ShardRunnerMessage::AddCollectorvariant in favor of theShardMessenger::add_collectormethod. This method adds the collectors immediately, whereasShardRunnerMessageis polled periodically in a loop - this could occasionally cause collectors to drop the first event they received. - All remaining types found at
serenity::client::bridge::{gateway,voice}::*have been moved intoserenity::gateway. They are now gated behind thegatewayfeature instead of theclientfeature, however most users use these features in conjunction, and so should not see a change in required-enabled features.
MSRV
Serenity now uses Rust edition 2021, with an MSRV of Rust 1.74.
Miscellaneous
Added
- #1923, #2465 - Add a
thread_idparameter toHttp::{get,edit,delete}_webhook_message,Http::execute_webhook}, as well asWebhook::{get,delete}_message. - #2104, #2105 - Add an
audit_log_reasonparameter to manyHttpmethods and builder structs. - #2164 - Add
EventHandler::shards_readymethod. - #2186, #2201 - Add support for having a bot interactions endpoint URL.
- #2215 - Implement
Defaultfor many model types. - #2233 - Add
buttonandselect_menumethods to the following builders:CreateInteractionResponseMessageCreateInteractionResponseFollowupEditInteractionResponseCreateMessageEditMessageEditWebhookMessageExecuteWebhook
- #2247, #2357, #2385 - Add support for forum channels and creating forum posts using
ChannelId::create_forum_postandGuildChannel::create_forum_post. - #2257 - Add support for multiple event handlers by replacing the
event_handlerandraw_event_handlerfields with pluralizedevent_handlersandraw_event_handlersin the following structs:ShardManagerOptionsShardQueuerShardRunnerShardRunnerOptionsClientBuilder
- #2273, #2367 - Add events
ReactionRemoveEmojiandGuildAuditLogEntryCreate. - #2276 - Add support for automod regex patterns.
- #2297 - Add the
serenity::allmodule, which re-exports most public items in the crate. - #2336 - Add a
CreateButton::custom_idmethod. - #2369 - Add support for editing a guild's MFA level using
{GuildId, Guild, PartialGuild}::edit_mfa_level. - #2391 - Add attachments support to the
EditWebhookMessageendpoint by adding anew_attachmentsparameter toHttp::edit_webhook_message, as well as the following methods to theEditWebhookMessagebuilder:attachmentadd_existing_attachmentremove_existing_attachment
- #2415, #2461 - Add support for Discord's new usernames by adding the
User::global_namefield, and by making discriminators on usernames optional and non-zero. In particular, thePresenceUser::discriminatorandUser::discriminatorfields are now of typeOption<NonZeroU16>. - #2487 - Add support for the Get Current User Guild Member endpoint with the
{GuildId,Guild,PartialGuild}::current_user_membermethod. - #2503 - Add support for setting custom activity statuses.
- #2520 - Add the
User::static_facemethod, mirroringUser::face. - #2535 - Add pagination support to the Get Guild Bans endpoint.
- #2565 - Add support for the
VOICE_CHANNEL_STATUS_UPDATEgateway event. - #2576 - Add a
GuildId::everyone_rolemethod. - #2588 - Add audit log events for creator monetization.
- #2595 - Add the
CREATE_EVENTSandCREATE_GUILD_EXPRESSIONSpermissions, and renameMANAGE_EMOJIS_AND_STICKERStoMANAGE_GUILD_EXPRESSIONS(the old name is still present but deprecated). - #2600 - Add the
FormattedTimestamputility struct for representing a combination of a timestamp and a formatting style. - #2601 - Add support for more Discord subdomains in
utils::argument_convert::parse_message_url. - #2614 - Add
HashtoTimestamp's derive list. - #2592 - Add experimental
typesizesupport. - #2618 - Implement
From<Into<String>>forAutocompleteChoice.
Changed
- #1896 -
Request::body_refnow returnsOption<&T>instead of&Option<&T>. - #1897, #2350 -
Typing::stopnow returnsboolinstead ofOption<()>. Also,Typing::startand any wrapper methods are now infallible. - #1922, #1940, #2090 - The following methods are no longer
async:ChannelId::nameContext::*Guild::{members_starting_with, members_containing, members_username_containing, members_nick_containing}Guild::default_channelPartialGuild::greater_member_hierarchyShardManager::newUserId::to_user_cached
- #1929 - Unbox the
Error::Httpvariant. - #1934 - Change
Guild::memberto returnCow<'_, Member>instead of justMember. - #1937 - Change all fields of
ShardManagerOptionsto be owned (Arcis cheap to clone). - #1947 - Change methods related to pruning to take and return
u8. - #1963 - Change
RequestBuilder::bodyfromOption<&[u8]>toOption<Vec<u8>>. - #1976 - Make
MessageInteractionnon-exhaustive, and add amemberfield. - #1977 - Rename
Permissions::USE_SLASH_COMMANDStoUSE_APPLICATION_COMMANDS. - #1980 - Rename
constants::OpCodetoOpcode, and the same forvoice_model::OpCode. - #1984 - Introduce
ShardInfofor tracking Shard ids, and change ids fromu64tou32. - #1990 - Change the
Message::noncefield to a customNonceenum instead of aserde_json::Value. - #1999 - Make
MembershipState,ScheduledEventStatus, andScheduledEventTypenon-exhaustive. - #2005 - Change
MessageActivityKindvariants to use CamelCase instead of ALL_CAPS. - #2007, #2018 - Rework presence setting and storing as follows:
- Replace
CurrentPresencewith aPresenceDatastruct. - Use
ActivityDatain place ofActivityfor setting the current presence. - Change the various
set_activitymethods to take anOption<ActivityData>to allow for clearing the current presence by passing inNone. - Add support for setting a presence when first identifying to the gateway by adding presence methods to
ClientBuilder, and adding an optionalpresenceparameter toShard::new.
- Replace
- #2008 - Unknown values for enum variants are now preserved for debugging purposes. Any
Unknownvariants on enums are now changed toUnknown(u8). Also, thenummethod for those enums is removed; users should callu8::frominstead. - #2017 - Change
Member::editto edit in place, and returnResult<()>instead ofResult<Member>. - #2023, #2170, #2459 - Use Id types everywhere instead of
u32,u64, orNonZeroU64. - #2030 - Change
{GuildId, Guild, PartialGuild}::deleteto returnResult<()>. - #2032 - Replace
impl From<String> for Timestampwithimpl TryFrom<&str>. - #2047 - The following functions are now
const:LightMethod::reqwest_methodRatelimit::{limit, remaining, reset, reset_after}RequestBuilder::newChannel::{id, position, name}Error::is_cache_errEvent::event_typeEventType::nameGatewayIntents::*Permissions::*
- #2052 - Change the
CommonFilterOptions::{filter_limit, collect_limit}fields fromu32toNonZeroU32. - #2054 - Change the
GuildChannel::message_countfield fromOption<u8>toOption<u32>. - #2073 - Move the
serenity::utils::colourmodule intoserenity::model. - #2127 - Replace
CreateAllowedMentions::parsewithall_users,all_roles, andeveryonemethods. - #2139 - Change
ChannelId::nameto returnResult<String>instead ofOption<String>. - #2144 - Don't offer different function signatures for
EventHandlermethods if thecachefeature is disabled. Relevant cache-dependant data is now passed in usingOption. - #2149 - Change channel positions, role positions, and bitrates to always be
u32. - #2173 - Replace the implementation of
FutureforClientBuilderwithIntoFuture. - #2173 - Make
ClientBuilder::{get_token, get_type_map, get_cache_settings}infallible. - #2194 - Change
CacheUpdate::OutputforChannelDeleteEventfrom()toVec<Message>. - #2205 - Wrap the following large model fields in
Box:CommandInteraction::memberComponentInteraction::messageModalInteraction::messageMessage::memberMessage::interaction
- #2224 - Introduce
CreateSelectMenuKindandComponentInteractionDataKindenums to better enforce well-formation of requests. - #2244 - Flatten the
httpmodule by re-exporting all types found in submodules at the top level and removinng access to the submodules themselves. - #2277 - Make
ErrorResponsenon-exhaustive, change theurlfield fromUrltoString, and add amethodfield. - #2285 - Wrap the
Http::ratelimiterfield inOption, and remove the correspondingratelimiter_disabledfield. - #2285 - Add an optional
reasonparameter toHttp::{ban, kick}, and removeHttp::{ban,kick}_with_reason. - #2288 - Merge the
RouteandRouteInfoenums, and addmethodandparamsfields to theRequeststruct. - #2310 - Flatten the
model::applicationmodule in the same way thehttpmodule was flattened. - #2327 - Change the
ThreadMembersUpdateEvent::member_countfield fromu8toi16. - #2393 - Change the following field and enum variant types:
GuildUpdateEvent::guildfromPartialGuildtoGuildReaction::memberfromOption<PartialMember>toMemberIntegration::guild_idfromGuildIdtoOption<GuildId>IncidentUpdate::statusfromIncidentStatustoString(IncidentStatusis also removed){Guild,PartialGuild}::premium_subscription_countfromu64toOption<u64>InputText::valuefromStringtoOption<String>CurrentApplicationInfo::ownerfromUsertoOption<User>ScheduledEventMetadata::locationfromStringtoOption<String>Trigger::KeywordPresetfrom a tuple variant to a struct variant
- #2393 - Rename the following field and enum variants:
Incident::short_linktoshortlinkThreadDeleteEvent::channels_idtochannel_idsThreadMembersUpdateEvent::removed_members_idstoremoved_member_idsInviteTargetType::EmmbeddedApplicationtoEmbeddedApplicationScope::RelactionshipsReadtoRelationshipsRead
- #2393, #2418 - Change
CurrentUserto be a newtype aroundUser, implement theDereftrait, and remove theguilds,invite_url, andinvite_url_with_oauth2_scopesmethods. The only method now unique toCurrentUserisedit. All other methods are available to call via deref coercion. - #2397 - Make the following
modeltypes non-exhaustive:model::application::{Interaction, ActionRow, Button, SelectMenu, SelectMenuOption, InputText}model::application::{PartialCurrentApplicationInfo, Team, TeamMember, InstallParams}model::channel::{PartialGuildChannel, ChannelMention}model::gateway::{ActivityEmoji, ClientStatus}model::guild::{Ban, GuildPrune, GuildInfo, UnavailableGuild, GuildWelcomeScreen}model::guild::{ScheduledEventMetadata, ScheduledEventUser}model::guild::automod::{Rule, TriggerMetadata, Action, ActionExecution}model::misc::EmojiIdentifier
- #2428 - Change
CacheUpdate::OutputforChannelUpdateEventfrom()toChannel. Also, make{Guild,PartialGuild}::user_permissions_ininfallible and changeError::InvalidPermissionsinto a struct variant containing both the therequiredpermissions as well as thepresentpermissions. - #2460 - Wrap secret tokens in
secrecy::SecretStringto prevent them being leaked throughDebugimplementations, and so that they are zeroed when dropped. - #2462, #2467, #2586 - Change image hashes from
Strings to a dedicatedImageHashtype which saves on space by storing the hash directly as bytes. - #2464 - Optimize the size of many model structs by changing the types of their fields:
- All
rate_limit_per_userfields are now counted using au16. - Channel
positionfields now hold au16. - Role
posititionfields now hold au16. - All
auto_archive_positionfields are now an enumAutoArchivePosition. - All
afk_timeoutfields are now an enumAfkTimeout. - Replace the
DefaultReactionstruct with aForumEmojienum. - The
Sticker::sort_valuefield is now anOption<u16>. - The
min_valuesandmax_valuesfields for Select Menus now hold au8. - The
max_ageinvite field now holds au32. - The
max_usesinvite field now holds au8. - The
ActivityPartycurrent and maximum size are now of typeu32. - The
Ready::versionfield is now au8. - The
min_lengthandmax_lengthfields for Input Text components now hold au16. - The
mention_total_limitfield for automod triggers now holds au8. - The
RoleSubscriptionData::total_months_subscribedfield is now au16.
- All
- #2470 - Rename
{Http,ChannelId,GuildChannel}::create_public_threadtocreate_thread_from_message, and similarly renamecreate_private_threadtocreate_thread, to more accurately reflect their behavior. The corresponding endpoints have also been renamed fromChannelPublicThreads/ChannelPrivateThreads, toChannelMessageThreads/ChannelThreads, respectively. - #2519 - Make stage channels text-based.
- #2551 - The
ThreadDeleteevent now provides the fullGuildChannelobject for the deleted thread if it is present in the cache. - #2553 - The
ThreadUpdateevent now provides the old thread'sGuildChannelobject if it is present in the cache. - #2554 - The
Webhook::source_guildandWebhook::source_channelfields have had their types changed fromOption<PartialGuild>/Option<PartialChannel>to their ownOption<WebhookGuild>/Option<WebhookChannel>types in order to avoid deserialization errors. These new types contain very few fields, but have methods for converting intoPartialGuilds orChannels by querying the API. - #2569 - Replaced the
json::preludemodule with public wrapper functions that abstract over bothserde_jsonandsimd-json. - #2593 - Rename
GatewayIntents::GUILD_BANStoGUILD_MODERATION(the old name is still present but is deprecated). - #2598 - Change
CreateInteractionResponseMessage::flagsto takeInteractionResponseFlagsinstead ofMessageFlags. - #2609 - Split parts of
ThreadMemberintoPartialThreadMember. - #2622 - Implement role addition/removal using dedicated endpoints.
- #2623 - Use dedicated types for
GuildId::audit_logs. - #2625 - Change
Guild::members_with_statusto returnimpl Iterator<Item = &Member>instead ofVec<Member>.
Removed
- #1864, #1902 - Remove all deprecated types, fields, and methods.
- #1885 - Remove the lifetime parameter on
model::application::ResolvedTarget. - #1927 - Remove
model::guild::GuildContainer. - #1938 - Remove
EventHandler::{guild_unavailable, unknown}. - #1959 - Remove
EditProfile::{email, password, new_password}. - #2034 - Remove
serenity::json::from_number. Users should call.into()instead. - #2128 - Remove the
Channel::Categoryvariant, asGuildChannel::kindcan already beChannelType::Category. However, theChannel::categorymethod is still available. - #2161 - Remove the
Mention::Emojivariant. - #2162 - Remove
serenity::token::parse- usetoken::validateinstead. - #2246 - Remove the
absolute_ratelimitsfeature and replace it with a runtime configuration option. - #2308 - Remove
CacheAndHttp, and inline it as separatecacheandhttpfields in the following structs:ShardManagerOptionsShardQueuerShardRunnerShardRunnerOptionsClient
- #2393 - Remove non-existent fields and enum variants that Discord no longer sends back from the API. The following fields have been removed:
VoiceServerUpdateEvent::channel_idResumedEvent::channel_idReady::{presences, private_channels, trace}InviteGuild::{text_channel_count, voice_channel_count}VoiceState::tokenIncidentUpdate::affected_components(and also theAffectedComponentstruct)Maintenance::{description, stop, start}SelectMenu::valuesMessageUpdateEvent::{author, timestamp, nonce, kind, stickers}PartialGuild::{owner, permissions}InviteTargetType::NormalTrigger::HarmfulLink
- #2424 - Remove the
FromStrAndCacheandStrExttraits. Also removesmodel::{ChannelParseError,RoleParseError}, which conflicted with types of the same name fromutils. - #2429 - Remove the useless re-exports of the various submodules of
modelfrom themodel::prelude, and don't re-export types from other libraries, likeDeserializeorHashMap. - #2466 - Remove the
DefaultAvatarenum. - #2531 - The following bitflag types no longer implement
PartialOrd/Ord:- ActivityFlags
- ApplicationFlags
- ChannelFlags
- GatewayIntents
- GuildMemberFlags
- InteractionResponseFlags
- MessageFlags
- Permissions
- SpeakingState
- SystemChannelFlags
- ThreadMemberFlags
- UserPublicFlags
- #2559 - Remove the
EventTypeenum. Instead ofEvent::event_type().name(), users should just callEvent::name. - #2578 - Remove the
PingInteraction::guild_localefield.
Release notes
Open source →This release turned out to be one of serenity's largest ever, with well over 300 PRs in total! It contains quite a few major breaking changes to the API. Therefore, the changelog for this release also serves as a migration guide for users upgrading from the 0.11 series.
Thanks to the following for their contributions:
- [@arqunis]
- [@alakhpc]
- [@AngelOnFira]
- [@Bloectasy]
- [@campbellcole]
- [@cheesycod]
- [@crivasr]
- [@darkyeg]
- [@fenhl]
- [@GnomedDev]
- [@jamesbt365]
- [@Joshument]
- [@kangalio]
- [@Kneemund]
- [@marcantoinem]
- [@Miezhiko]
- [@Milo123459]
- [@mkrasnitski]
- [@nickelc]
- [@oSumAtrIX]
- [@Ruthenic]
- [@Sergiovan]
- [@skreborn]
- [@StckOverflw]
- [@tatsuya6502]
- [@tazz4843]
- [@vaporoxx]
- [@Xaeroxe]
Builders
The closure-based API for constructing requests using the builder pattern has been ripped out and replaced. In place of closures, users must now pass in builder types directly. For example, in serenity 0.11, code like the following was very common:
let channel = guild .create_channel(&http, |c| c.name("my-test-channel").kind(ChannelType::Text)) .await?;Now, users instead write the following code:
let builder = CreateChannel::new("my-test-channel").kind(ChannelType::Text); let channel = guild.create_channel(&http, builder).await?;Or, inline like so:
let channel = guild .create_channel(&http, CreateChannel::new("my-test-channel").kind(ChannelType::Text)) .await?;Note that in this particular example, the channel name is now a mandatory field that must be passed in when constructing the builder. Mutating the builder with subsequent calls to
CreateChannel::namewill change the underlying value. Additionally, all methods on builders now takemut selfand returnSelf, instead of taking and returning&mut self/&mut Self. This allows for explicit construction as in the second example above. Also, builders no longer wrap apub HashMap<&'static str, T>; the hashmap has been flattened into concrete private fields.Some benefits to this new approach to builders are:
- Because every closure has a type unique to it, each call to a method taking a closure would be monomorphized separately, resulting in binary bloat. This is no longer the case.
- Builders can be constructed once and then cloned and re-used multiple times.
- Enforcement of field requirements (as dictated by the Discord API docs) provides compile-time request validation.
Attachments
- The
AttachmentTypeenum has been replaced with aCreateAttachmentbuilder struct. This struct has thefile,path, andurlconstructors that eagerly evaluate the data passed to them -CreateAttachmentsimply stores the resulting raw data. This is in contrast toAttachmentTypewhich lazily carried filepaths/urls with it, and haddataandfilenamemethods for resolving them. Additionally, theCreateAttachment::to_base64method can be used to manually encode an attachment if needed. - A new
EditAttachmentsbuilder struct has been added for use with theattachmentsmethod on theEditMessage,EditWebhookMessage, andEditInteractionResponsebuilders. This new builder provides finer control when editing a message's existing attachments or uploading additional ones. Also, the following methods have been renamed to more accurately reflect their behavior:
serenity v0.11 serenity v0.12 EditMessage::attachmentEditMessage::new_attachmentEditMessage::add_existing_attachmentEditMessage::keep_existing_attachmentEditWebhookMessage::clear_existing_attachmentsEditWebhookMessage::clear_attachmentsEditInteractionResponse::clear_existing_attachmentsEditInteractionResponse::clear_attachmentsCollectors
Collectors have been redesigned and simplified at no cost to expressibility. There is now a generic
collector::collectfunction which takes a closure as argument, letting you filter events as they stream in.- The specific collectors (
ComponentInteractionCollector,ModalInteractionCollector,MessageCollector, andReactionCollector) are simply convenience structs that wrap this underlying function. EventCollectoris now deprecated, as its use usually involved anti-patterns around fallibility. However, its functionality can still be replicated usingcollector::collect. See example 10 for more details.- The
RelatedIdandRelatedIdsForEventTypetypes have been removed as they were only used byEventCollector. Methods for retrieving them from events have also been removed; if users wish to extract "related" ids from an event, they should do so directly from the event's fields. The removed methods are the following:Event::user_idEvent::guild_idEvent::channel_idEvent::message_idEventType::related_ids
Commands
In an effort to shorten long names and make import paths less unwieldy, Serenity now uses
commandinstead ofapplication_commandin all places, except for thePermissions::USE_APPLICATION_COMMANDSconstant. This includes methods on theHttp,GuildId,Guild,PartialGuild, andCommandtypes, as well as a few other miscellaneous places:serenity v0.11 serenity v0.12 Http::*_{global,guild}_application_command*Http::*_{global,guild}_command*{GuildId,Guild,PartialGuild}::*_application_command*{GuildId,Guild,PartialGuild}::*_command*Command::*_global_application_command*Command::*_global_command*Interaction::application_commandInteraction::commandEventHandler::application_command_permissions_updateEventHandler::command_permissions_updateRoute::ApplicationCommand*Route::Command*Permissions::use_application_commandsPermissions::use_commandsAdditionally, the following command types have been renamed:
serenity v0.11 serenity v0.12 CreateApplicationCommandCreateCommandCreateApplicationCommandOptionCreateCommandOptionCreateApplicationCommandPermissionDataCreateCommandPermissionCreateApplicationCommandPermissionsDataEditCommandPermissionsCommandPermissionCommandPermissionsCommandPermissionDataCommandPermissionFurthermore, the methods on
CreateCommandPermission, such asnew,kind, etc. have been replaced with constructors for each type of permission, e.g.role,user,channel, etc., to avoid a possible mismatch betweenkindand the id that gets passed in.Finally, the
{GuildId,Guild,PartialGuild}::create_command_permissionmethod has been renamed toedit_command_permissionto more accurately reflect its behavior.Cache
- Cache methods now return a
CacheReftype that wraps a reference into the cache. Other methods that returned a map, now return a wrapper type around a reference to the map, with a limited API to prevent accidental deadlocks. This all helps reduce the number of clones when querying the cache. Those wishing to replicate the old behavior can simply call.clone()on the return type to obtain the wrapped data. CacheSettingshas new fieldstime_to_live,cache_guilds,cache_channels, andcache_users, allowing cache configuration on systems with memory requirements; whereas previously, memory-constrained systems were forced to disable caching altogether.- Caching for
PrivateChannels (aka DM channels) has been removed, as they are never sent across the gateway by Discord. Therefore, theCache::{private_channel, private_channels}methods have been removed, andCache::guild_channelhas been renamed to justCache::channel. Additionally, some uses of theChannelenum in return types have been replaced with eitherGuildChannelorPrivateChannelas seen fit.
IDs
All
*Idtypes have had their internal representations made private. Therefore, the API has changed as follows:serenity v0.11 serenity v0.12 ExampleId(12345)ExampleId::new(12345)example_id.as_u64()example_id.get()Note that all
*Idtypes now implementInto<u64>andInto<i64>. Additionally, attempting to instantiate an id with a value of0will panic.Also, the implementations of
FromStrfor theUserId,RoleId, andChannelIdtypes now expect an integer rather than a mention string. The following table shows the new expected input strings:serenity v0.11 serenity v0.12 ChannelId<#81384788765712384>81384788765712384RoleId<@&136107769680887808>136107769680887808UserId<@114941315417899012>or<@!114941315417899012>114941315417899012Users wishing to parse mentions should either parse into a
Mentionobject, or use theutils::{parse_user_mention, parse_role_mention, parse_channel_mention}methods.Interactions
The various interaction types have been renamed as follows:
serenity v0.11 serenity v0.12 ApplicationCommandInteractionCommandInteractionMessageComponentInteractionComponentInteractionModalSubmitInteractionModalInteractionMethod names on interaction types have been shortened in the following way:
serenity v0.11 serenity v0.12 create_interaction_responsecreate_responsecreate_followup_messagecreate_followupdelete_original_interaction_responsedelete_responsedelete_followup_messagedelete_followupedit_original_interaction_responseedit_responseedit_followup_messageedit_followupget_interaction_responseget_responseget_followup_messageget_followupAutocompleteInteractionhas been merged intoCommandInteraction, along with its corresponding methods.- The
kindfield has been removed from each of the interaction structs. - A
quick_modalmethod has been added toCommandInteractionandComponentInteraction. See the docs for more details.
Framework
The standard framework is now configurable at runtime, as the
configuremethod now takesselfby reference. Also, theFrameworktrait has been reworked to accomodate more use cases than just text commands:- The
dispatchmethod now takes aFullEventas argument instead of just aMessage. This enum contains all the data that is passed to theEventHandler. - An optional
initmethod has been added, that allows for more complex framework initialization, which can include executing HTTP requests, or accessing cache or shard data.
As a result, the trait now accomodates alternative frameworks more easily, such as poise.
Gateway
- Renamed
WsStreamtoWsClient. - The
ShardManagerMonitorandShardManagerMessagetypes have been removed. Their functionality has been replicated via methods directly onShardManager. Any fields with typeSender<ShardManagerMessage>, as well as theClient::shard_managerfield, have had their types changed toArc<ShardManager>. The new methods onShardManagerare the following:return_with_valueshutdown_finishedrestart_shardupdate_shard_latency_and_stage
- The
ShardClientMessageandInterMessageenums were deemed redundant wrappers aroundShardRunnerMessageand removed - users should useShardRunnerMessagedirectly instead. - The
ShardManagerErrortype is removed in favor ofGatewayError. - Serenity's handling of gateway heartbeats has been made more accurate and type safe as follows:
- Removed
Shard::heartbeat_instants. Users should instead use thelast_heartbeat_{sent,ack}methods, which now returnOption<Instant>instead ofOption<&Instant>. - Changed
Shard::heartbeat_intervalto returnOption<Duration>instead ofOption<u64>. - Rename
Shard::check_heartbeattodo_heartbeat.
- Removed
ShardMessenger::newnow takes&ShardRunneras argument instead ofSender<ShardRunnerMessage>.- Removed the
ShardRunnerMessage::AddCollectorvariant in favor of theShardMessenger::add_collectormethod. This method adds the collectors immediately, whereasShardRunnerMessageis polled periodically in a loop - this could occasionally cause collectors to drop the first event they received. - All remaining types found at
serenity::client::bridge::{gateway,voice}::*have been moved intoserenity::gateway. They are now gated behind thegatewayfeature instead of theclientfeature, however most users use these features in conjunction, and so should not see a change in required-enabled features.
MSRV
Serenity now uses Rust edition 2021, with an MSRV of Rust 1.74.
Miscellaneous
Added
- #1923, #2465 - Add a
thread_idparameter toHttp::{get,edit,delete}_webhook_message,Http::execute_webhook}, as well asWebhook::{get,delete}_message. - #2104, #2105 - Add an
audit_log_reasonparameter to manyHttpmethods and builder structs. - #2164 - Add
EventHandler::shards_readymethod. - #2186, #2201 - Add support for having a bot interactions endpoint URL.
- #2215 - Implement
Defaultfor many model types. - #2233 - Add
buttonandselect_menumethods to the following builders:CreateInteractionResponseMessageCreateInteractionResponseFollowupEditInteractionResponseCreateMessageEditMessageEditWebhookMessageExecuteWebhook
- #2247, #2357, #2385 - Add support for forum channels and creating forum posts using
ChannelId::create_forum_postandGuildChannel::create_forum_post. - #2257 - Add support for multiple event handlers by replacing the
event_handlerandraw_event_handlerfields with pluralizedevent_handlersandraw_event_handlersin the following structs:ShardManagerOptionsShardQueuerShardRunnerShardRunnerOptionsClientBuilder
- #2273, #2367 - Add events
ReactionRemoveEmojiandGuildAuditLogEntryCreate. - #2276 - Add support for automod regex patterns.
- #2297 - Add the
serenity::allmodule, which re-exports most public items in the crate. - #2336 - Add a
CreateButton::custom_idmethod. - #2369 - Add support for editing a guild's MFA level using
{GuildId, Guild, PartialGuild}::edit_mfa_level. - #2391 - Add attachments support to the
EditWebhookMessageendpoint by adding anew_attachmentsparameter toHttp::edit_webhook_message, as well as the following methods to theEditWebhookMessagebuilder:attachmentadd_existing_attachmentremove_existing_attachment
- #2415, #2461 - Add support for Discord's new usernames by adding the
User::global_namefield, and by making discriminators on usernames optional and non-zero. In particular, thePresenceUser::discriminatorandUser::discriminatorfields are now of typeOption<NonZeroU16>. - #2487 - Add support for the Get Current User Guild Member endpoint with the
{GuildId,Guild,PartialGuild}::current_user_membermethod. - #2503 - Add support for setting custom activity statuses.
- #2520 - Add the
User::static_facemethod, mirroringUser::face. - #2535 - Add pagination support to the Get Guild Bans endpoint.
- #2565 - Add support for the
VOICE_CHANNEL_STATUS_UPDATEgateway event. - #2576 - Add a
GuildId::everyone_rolemethod. - #2588 - Add audit log events for creator monetization.
- #2595 - Add the
CREATE_EVENTSandCREATE_GUILD_EXPRESSIONSpermissions, and renameMANAGE_EMOJIS_AND_STICKERStoMANAGE_GUILD_EXPRESSIONS(the old name is still present but deprecated). - #2600 - Add the
FormattedTimestamputility struct for representing a combination of a timestamp and a formatting style. - #2601 - Add support for more Discord subdomains in
utils::argument_convert::parse_message_url.
Changed
- #1896 -
Request::body_refnow returnsOption<&T>instead of&Option<&T>. - #1897, #2350 -
Typing::stopnow returnsboolinstead ofOption<()>. Also,Typing::startand any wrapper methods are now infallible. - #1922, #1940, #2090 - The following methods are no longer
async:ChannelId::nameContext::*Guild::{members_starting_with, members_containing, members_username_containing, members_nick_containing}Guild::default_channelPartialGuild::greater_member_hierarchyShardManager::newUserId::to_user_cached
- #1929 - Unbox the
Error::Httpvariant. - #1934 - Change
Guild::memberto returnCow<'_, Member>instead of justMember. - #1937 - Change all fields of
ShardManagerOptionsto be owned (Arcis cheap to clone). - #1947 - Change methods related to pruning to take and return
u8. - #1963 - Change
RequestBuilder::bodyfromOption<&[u8]>toOption<Vec<u8>>. - #1976 - Make
MessageInteractionnon-exhaustive, and add amemberfield. - #1977 - Rename
Permissions::USE_SLASH_COMMANDStoUSE_APPLICATION_COMMANDS. - #1980 - Rename
constants::OpCodetoOpcode, and the same forvoice_model::OpCode. - #1984 - Introduce
ShardInfofor tracking Shard ids, and change ids fromu64tou32. - #1990 - Change the
Message::noncefield to a customNonceenum instead of aserde_json::Value. - #1999 - Make
MembershipState,ScheduledEventStatus, andScheduledEventTypenon-exhaustive. - #2005 - Change
MessageActivityKindvariants to use CamelCase instead of ALL_CAPS. - #2007, #2018 - Rework presence setting and storing as follows:
- Replace
CurrentPresencewith aPresenceDatastruct. - Use
ActivityDatain place ofActivityfor setting the current presence. - Change the various
set_activitymethods to take anOption<ActivityData>to allow for clearing the current presence by passing inNone. - Add support for setting a presence when first identifying to the gateway by adding presence methods to
ClientBuilder, and adding an optionalpresenceparameter toShard::new.
- Replace
- #2008 - Unknown values for enum variants are now preserved for debugging purposes. Any
Unknownvariants on enums are now changed toUnknown(u8). Also, thenummethod for those enums is removed; users should callu8::frominstead. - #2017 - Change
Member::editto edit in place, and returnResult<()>instead ofResult<Message>. - #2023, #2170, #2459 - Use Id types everywhere instead of
u32,u64, orNonZeroU64. - #2030 - Change
{GuildId, Guild, PartialGuild}::deleteto returnResult<()>. - #2032 - Replace
impl From<String> for Timestampwithimpl TryFrom<&str>. - #2047 - The following functions are now
const:LightMethod::reqwest_methodRatelimit::{limit, remaining, reset, reset_after}RequestBuilder::newChannel::{id, position, name}Error::is_cache_errEvent::event_typeEventType::nameGatewayIntents::*Permissions::*
- #2052 - Change the
CommonFilterOptions::{filter_limit, collect_limit}fields fromu32toNonZeroU32. - #2054 - Change the
GuildChannel::message_countfield fromOption<u8>toOption<u32>. - #2073 - Move the
serenity::utils::colourmodule intoserenity::model. - #2127 - Replace
CreateAllowedMentions::parsewithall_users,all_roles, andeveryonemethods. - #2139 - Change
ChannelId::nameto returnResult<String>instead ofOption<String>. - #2144 - Don't offer different function signatures for
EventHandlermethods if thecachefeature is disabled. Relevant cache-dependant data is now passed in usingOption. - #2149 - Change channel positions, role positions, and bitrates to always be
u32. - #2173 - Replace the implementation of
FutureforClientBuilderwithIntoFuture. - #2173 - Make
ClientBuilder::{get_token, get_type_map, get_cache_settings}infallible. - #2194 - Change
CacheUpdate::OutputforChannelDeleteEventfrom()toVec<Message>. - #2205 - Wrap the following large model fields in
Box:CommandInteraction::memberComponentInteraction::messageModalInteraction::messageMessage::memberMessage::interaction
- #2224 - Introduce
CreateSelectMenuKindandComponentInteractionDataKindenums to better enforce well-formation of requests. - #2244 - Flatten the
httpmodule by re-exporting all types found in submodules at the top level and removinng access to the submodules themselves. - #2277 - Make
ErrorResponsenon-exhaustive, change theurlfield fromUrltoString, and add amethodfield. - #2285 - Wrap the
Http::ratelimiterfield inOption, and remove the correspondingratelimiter_disabledfield. - #2285 - Add an optional
reasonparameter toHttp::{ban, kick}, and removeHttp::{ban,kick}_with_reason. - #2288 - Merge the
RouteandRouteInfoenums, and addmethodandparamsfields to theRequeststruct. - #2310 - Flatten the
model::applicationmodule in the same way thehttpmodule was flattened. - #2327 - Change the
ThreadMembersUpdateEvent::member_countfield fromu8toi16. - #2393 - Change the following field and enum variant types:
GuildUpdateEvent::guildfromPartialGuildtoGuildReaction::memberfromOption<PartialMember>toMemberIntegration::guild_idfromGuildIdtoOption<GuildId>IncidentUpdate::statusfromIncidentStatustoString(IncidentStatusis also removed){Guild,PartialGuild}::premium_subscription_countfromu64toOption<u64>InputText::valuefromStringtoOption<String>CurrentApplicationInfo::ownerfromUsertoOption<User>ScheduledEventMetadata::locationfromStringtoOption<String>Trigger::KeywordPresetfrom a tuple variant to a struct variant
- #2393 - Rename the following field and enum variants:
Incident::short_linktoshortlinkThreadDeleteEvent::channels_idtochannel_idsThreadMembersUpdateEvent::removed_members_idstoremoved_member_idsInviteTargetType::EmmbeddedApplicationtoEmbeddedApplicationScope::RelactionshipsReadtoRelationshipsRead
- #2393, #2418 - Change
CurrentUserto be a newtype aroundUser, implement theDereftrait, and remove theguilds,invite_url, andinvite_url_with_oauth2_scopesmethods. The only method now unique toCurrentUserisedit. All other methods are available to call via deref coercion. - #2397 - Make the following
modeltypes non-exhaustive:model::application::{Interaction, ActionRow, Button, SelectMenu, SelectMenuOption, InputText}model::application::{PartialCurrentApplicationInfo, Team, TeamMember, InstallParams}model::channel::{PartialGuildChannel, ChannelMention}model::gateway::{ActivityEmoji, ClientStatus}model::guild::{Ban, GuildPrune, GuildInfo, UnavailableGuild, GuildWelcomeScreen}model::guild::{ScheduledEventMetadata, ScheduledEventUser}model::guild::automod::{Rule, TriggerMetadata, Action, ActionExecution}model::misc::EmojiIdentifier
- #2428 - Change
CacheUpdate::OutputforChannelUpdateEventfrom()toChannel. Also, make{Guild,PartialGuild}::user_permissions_ininfallible and changeError::InvalidPermissionsinto a struct variant containing both the therequiredpermissions as well as thepresentpermissions. - #2460 - Wrap secret tokens in
secrecy::SecretStringto prevent them being leaked throughDebugimplementations, and so that they are zeroed when dropped. - #2462, #2467, #2586 - Change image hashes from
Strings to a dedicatedImageHashtype which saves on space by storing the hash directly as bytes. - #2464 - Optimize the size of many model structs by changing the types of their fields:
- All
rate_limit_per_userfields are now counted using au16. - Channel
positionfields now hold au16. - Role
posititionfields now hold au16. - All
auto_archive_positionfields are now an enumAutoArchivePosition. - All
afk_timeoutfields are now an enumAfkTimeout. - Replace the
DefaultReactionstruct with aForumEmojienum. - The
Sticker::sort_valuefield is now anOption<u16>. - The
min_valuesandmax_valuesfields for Select Menus now hold au8. - The
max_ageinvite field now holds au32. - The
max_usesinvite field now holds au8. - The
ActivityPartycurrent and maximum size are now of typeu32. - The
Ready::versionfield is now au8. - The
min_lengthandmax_lengthfields for Input Text components now hold au16. - The
mention_total_limitfield for automod triggers now holds au8. - The
RoleSubscriptionData::total_months_subscribedfield is now au16.
- All
- #2470 - Rename
{Http,ChannelId,GuildChannel}::create_public_threadtocreate_thread_from_message, and similarly renamecreate_private_threadtocreate_thread, to more accurately reflect their behavior. The corresponding endpoints have also been renamed fromChannelPublicThreads/ChannelPrivateThreads, toChannelMessageThreads/ChannelThreads, respectively. - #2519 - Make stage channels text-based.
- #2551 - The
ThreadDeleteevent now provides the fullGuildChannelobject for the deleted thread if it is present in the cache. - #2553 - The
ThreadUpdateevent now provides the old thread'sGuildChannelobject if it is present in the cache. - #2554 - The
Webhook::source_guildandWebhook::source_channelfields have had their types changed fromOption<PartialGuild>/Option<PartialChannel>to their ownOption<WebhookGuild>/Option<WebhookChannel>types in order to avoid deserialization errors. These new types contain very few fields, but have methods for converting intoPartialGuilds orChannels by querying the API. - #2569 - Replaced the
json::preludemodule with public wrapper functions that abstract over bothserde_jsonandsimd-json. - #2593 - Rename
GatewayIntents::GUILD_BANStoGUILD_MODERATION(the old name is still present but is deprecated). - #2598 - Change
CreateInteractionResponseMessage::flagsto takeInteractionResponseFlagsinstead ofMessageFlags.
Removed
- #1864, #1902 - Remove all deprecated types, fields, and methods.
- #1885 - Remove the lifetime parameter on
model::application::ResolvedTarget. - #1927 - Remove
model::guild::GuildContainer. - #1938 - Remove
EventHandler::{guild_unavailable, unknown}. - #1959 - Remove
EditProfile::{email, password, new_password}. - #2034 - Remove
serenity::json::from_number. Users should call.into()instead. - #2128 - Remove the
Channel::Categoryvariant, asGuildChannel::kindcan already beChannelType::Category. However, theChannel::categorymethod is still available. - #2161 - Remove the
Mention::Emojivariant. - #2162 - Remove
serenity::token::parse- usetoken::validateinstead. - #2246 - Remove the
absolute_ratelimitsfeature and replace it with a runtime configuration option. - #2308 - Remove
CacheAndHttp, and inline it as separatecacheandhttpfields in the following structs:ShardManagerOptionsShardQueuerShardRunnerShardRunnerOptionsClient
- #2393 - Remove non-existent fields and enum variants that Discord no longer sends back from the API. The following fields have been removed:
VoiceServerUpdateEvent::channel_idResumedEvent::channel_idReady::{presences, private_channels, trace}InviteGuild::{text_channel_count, voice_channel_count}VoiceState::tokenIncidentUpdate::affected_components(and also theAffectedComponentstruct)Maintenance::{description, stop, start}SelectMenu::valuesMessageUpdateEvent::{author, timestamp, nonce, kind, stickers}PartialGuild::{owner, permissions}InviteTargetType::NormalTrigger::HarmfulLink
- #2424 - Remove the
FromStrAndCacheandStrExttraits. Also removesmodel::{ChannelParseError,RoleParseError}, which conflicted with types of the same name fromutils. - #2429 - Remove the useless re-exports of the various submodules of
modelfrom themodel::prelude, and don't re-export types from other libraries, likeDeserializeorHashMap. - #2466 - Remove the
DefaultAvatarenum. - #2531 - The following bitflag types no longer implement
PartialOrd/Ord:- ActivityFlags
- ApplicationFlags
- ChannelFlags
- GatewayIntents
- GuildMemberFlags
- InteractionResponseFlags
- MessageFlags
- Permissions
- SpeakingState
- SystemChannelFlags
- ThreadMemberFlags
- UserPublicFlags
- #2559 - Remove the
EventTypeenum. Instead ofEvent::event_type().name(), users should just callEvent::name. - #2578 - Remove the
PingInteraction::guild_localefield.
-
0.12.0-rc224 Nov 2023 pre-releaseRelease notes
Open source →This is the second iteration of 0.12's Release Candidate. Notable inclusions since the prior iteration are:
-
0.12.0-rc19 Nov 2023 pre-releaseRelease notes
Open source →This is the Release Candidate for v0.12.0. For the list of changes made (which there are a ton), see the CHANGELOG file at the root of the repository.
-
0.11.724 Oct 2023Release notes
Open source →Thanks to the following for their contributions:
Notable changes
- (#2493) Add
MessageComponentInteraction::edit_original_message()for editing the original message of the message component. - (#2504) Implement
std::str::FromStrfor the ID types to allow converting from a string. This does not affect the pre-existing implementation onChannelId,RoleId, andUserId. - (#2506) Add missing
set_components()methods onEditInteractionResponseandEditWebhookMessage - (#2533) Add additional
delete_reactionanddelete_reactionsmethods for deleting reactions toChannelId,GuildChannel, andMessage. - (#2562) Bump
base64dependency to0.21
Release notes
Open source →Thanks to the following for their contributions:
- [@arqunis]
- [@B-2U]
- [@Collin-Swish]
- [@caoculus]
- [@Dean-Coakley]
- [@HexPandaa]
- [@mattfbacon]
- [@mkrasnitski]
- [@OnlyCS]
Notable changes
- (#2493) Add
MessageComponentInteraction::edit_original_message()for editing the original message of the message component. - (#2504) Implement
std::str::FromStrfor the ID types to allow converting from a string. This does not affect the pre-existing implementation onChannelId,RoleId, andUserId. - (#2506) Add missing
set_components()methods onEditInteractionResponseandEditWebhookMessage - (#2533) Add additional
delete_reactionanddelete_reactionsmethods for deleting reactions toChannelId,GuildChannel, andMessage. - (#2562) Bump
base64dependency to0.21
- (#2493) Add
-
0.11.630 Jun 2023Release notes
Open source →Special thanks to @mkrasnitski for writing this changelog ❤️
Thanks to the following for their contributions:
- @acdenisSK
- @Chronophylos
- @cyril-marpaud
- @dclamage
- @dpytaylo
- @float3
- @ghost
- @GnomedDev
- @ivancernja
- @jontze
- @kangalio
- @MarkusTheOrt
- @mkrasnitski
- @NinekoTheCat
- @Polyhistorian
- @rand0m-cloud
- @sandlotie
- @ShashankKumarSaxena
- @squili
- @Web-44
- @zackradisic
- @zzzzDev4
Notable changes
- (#2076) Make
Timestampusable regardless of thechronoortimefeatures. - (#2077) Deprecate modifying command application permissions in bulk. The corresponding endpoint is already deprecated by Discord.
- (#2130) Standard Framework: Implicitly set
BucketBuilder::await_ratelimitsto1uponBucketBuilder::delay_actionbeing set. - (#2133) Add Voice channels to the list of text-based channel types.
- (#2136) Add an event for HTTP ratelimits, and a corresponding
EventHandler::ratelimitmethod. - (#2154) Add the following fields to
MessageUpdateEvent:mention_channelsreactionscomponentssticker_items
- (#2155) Expose
Shard::handle_eventpublicly. - (#2214) Add
User::member, as well asMessage:{thread, application_id}fields. - (#2223, #2290) Add a
defer_ephemeralhelper method to many interaction types. - (#2265) Add
as_*andinto_*helper methods to theInteractiontype for converting to each of its respective variants. - (#2281) Add the
UserPublicFlags::ACTIVE_DEVELOPERflag. - (#2298) Add the following fields to guild channel, relevant for forums:
flagstotal_messages_sentavailable_tagsapplied_tagsdefault_reaction_emojidefault_thread_rate_limit_per_userdefault_sort_order
- (#2330) Add support for
owner_idin thread and forum channels. - (#2346) Add the
SUPPRESS_NOTIFICATIONSmessage flag. - (#2431) Add support for getting application commands with localizations via the following methods:
Http::get_{guild,global}_application_commands_with_localizationsCommand::get_global_application_commands_with_localizations{GuildId,Guild,PartialGuild}::get_application_commands_with_localizations
- (#2444) Add a
remove_all_attachmentsmethod toEditMessage.
Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@Chronophylos]
- [@cyril-marpaud]
- [@dclamage]
- [@dpytaylo]
- [@float3]
- [@ghost]
- [@GnomedDev]
- [@ivancernja]
- [@jontze]
- [@kangalio]
- [@MarkusTheOrt]
- [@mkrasnitski]
- [@NinekoTheCat]
- [@Polyhistorian]
- [@rand0m-cloud]
- [@sandlotie]
- [@ShashankKumarSaxena]
- [@squili]
- [@Web-44]
- [@zackradisic]
- [@zzzzDev4]
Notable changes
- (#2076) Make
Timestampusable regardless of thechronoortimefeatures. - (#2077) Deprecate modifying command application permissions in bulk. The corresponding endpoint is already deprecated by Discord.
- (#2130) Standard Framework: Implicitly set
BucketBuilder::await_ratelimitsto1uponBucketBuilder::delay_actionbeing set. - (#2133) Add Voice channels to the list of text-based channel types.
- (#2136) Add an event for HTTP ratelimits, and a corresponding
EventHandler::ratelimitmethod. - (#2154) Add the following fields to
MessageUpdateEvent:mention_channelsreactionscomponentssticker_items
- (#2155) Expose
Shard::handle_eventpublicly. - (#2214) Add
User::member, as well asMessage:{thread, application_id}fields. - (#2223, #2290) Add a
defer_ephemeralhelper method to many interaction types. - (#2265) Add
as_*andinto_*helper methods to theInteractiontype for converting to each of its respective variants. - (#2281) Add the
UserPublicFlags::ACTIVE_DEVELOPERflag. - (#2298) Add the following fields to guild channel, relevant for forums:
flagstotal_messages_sentavailable_tagsapplied_tagsdefault_reaction_emojidefault_thread_rate_limit_per_userdefault_sort_order
- (#2330) Add support for
owner_idin thread and forum channels. - (#2346) Add the
SUPPRESS_NOTIFICATIONSmessage flag. - (#2431) Add support for getting application commands with localizations via the following methods:
Http::get_{guild,global}_application_commands_with_localizationsCommand::get_global_application_commands_with_localizations{GuildId,Guild,PartialGuild}::get_application_commands_with_localizations
- (#2444) Add a
remove_all_attachmentsmethod toEditMessage.
-
0.11.529 Jul 2022Release notes
Open source →Thanks to the following for their contributions:
- [@bumblepie]
Notable changes
- Make select menu values optional to fix deserialization of message component interactions ([@bumblepie])
-
0.11.419 Jul 2022Release notes
Open source →Thanks to the following for their contributions:
- [@anden3]
Notable changes
- Fix deserialization error of
GuildChannel::message_count([@anden3])
-
0.11.319 Jul 2022 withdrawnRelease notes
Open source →Thanks to the following for their contributions:
- [@AlexisTM]
- [@aawilson]
- [@acdenisSK]
- [@bumblepie]
- [@DRuppFv]
- [@FallenWarrior2k]
- [@GnomedDev]
- [@kangalio]
- [@Milo123459]
- [@mkrasnitski]
- [@NotNorom]
- [@nickelc]
- [@SimonZehetner]
Notable changes
- Temporarily fix
GuildChannel::message_countin a non-breaking way ([@GnomedDev]) - Add support for
Auto Moderationfeature ([@nickelc]) - Add optional min/max length fields for application command string options ([@nickelc])
- Allow select menu response for modals ([@AlexisTM])
- Add
app_permissionsfield on interactions ([@nickelc]) - Enable
Invite::expires_atfield ([@mkrasnitski]) - Fix "missing field
discriminator" serde error for presence updates ([@nickelc]) - Add webhook example ([@NotNorom])
- Add
MessageType::AutoModerationActionenum variant ([@nickelc]) - Attempt to fix lifetime bug around
CustomisedHelpData([@mkrasnitski]) - Auto-impl
CacheHttpforArc<T>ifTalso implements it ([@mkrasnitski]) - Add audit log action types for scheduled events ([@nickelc])
- Fill gaps in all
model::applicationtypes ([@kangalio]) - Add support for slash command localization ([@kangalio])
- Implement announcement channel following ([@GnomedDev])
- Add event handler methods for scheduled events ([@nickelc])
- Add methods to
Webhookto enable direct creation ([@mkrasnitski]) - Consolidate
interactions&oauth2model types into theapplicationmodule ([@nickelc]) - Fix compile errors in builders when the
modelfeature is disabled ([@FallenWarrior2k])
-
0.11.208 May 2022Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@elkowar]
- [@GnomedDev]
- [@kangalio]
- [@MelonShooter]
- [@mkrasnitski]
- [@nickelc]
- [@tedtramonte]
Added
- [model] Implement Guild Scheduled Events support ([@mkrasnitski]) [c:e690ccd]
- [model] Add initial application command permissions v2 support ([@nickelc]) [c:bca105a]
- [model] Implement
OrdandPartialOrdforTimestamp([@tedtramonte]) [c:b1c3a62] - [model] Add new enum variant to
audit_log::Actionto represent unknown values ([@nickelc]) [c:b2ae872] - [model] Add
SUPPRESS_EMBEDSflag for interaction response messages ([@nickelc]) [c:888c37f] - [builder] Add function for interaction followup messages to set or unset the ephemeral flag ([@nickelc]) [c:10d9297]
- [model] Implement conversion from
GuildtoPartialGuild([@kangalio]) [c:475fc1f]
Changed
- [model] Split up a few functions to minimize monomorphization-bloat ([@elkowar]) [c:39fb310]
- [misc] Adapt the library to pass the majority of
clippy::pedanticlints ([@GnomedDev]) [c:dc22cf2] - [utils] Strip leading "Bot " in parse_token ([@kangalio]) [c:0a544c6]
- [model] Replace feature gated
simd-jsontrait imports withjson::prelude::*([@nickelc]) [c:3e454cc] - [gateway] Improve binary message deserialization time by optimizing
convert_ws_message([@MelonShooter]) [c:8b2326c] - [gateway] Remove duplicate WS client creation for native/rustls backends ([@nickelc]) [c:be17752]
- [utils] Use
Cowinutils/content_safe.rsto save on allocations ([@mkrasnitski]) [c:79a3cc8] - [misc] Use
dashmap5.2.0 for the MSRV build job ([@nickelc]) [c:2898af2] - [misc] Update
simd-jsonto 0.4.14 ([@nickelc]) [c:0ba01a7] - [model] Optimize guild create & delete event deserialization ([@nickelc]) [c:47433de]
- [model] Use
AttachmentType::datainEditRole::icon([@mkrasnitski]) [c:c3ad0b2] - [misc] Deny broken and private intra doc links ([@nickelc]) [c:56293bb]
- [misc] Update
.git-blame-ignore-revs([@nickelc]) [c:75df53e]
Fixed
- [misc] Fix wrong ID type in doc comment ([@nickelc]) [c:e1eaeeb]
- [model] Fix lifetimes on interaction response methods ([@kangalio]) [c:dd9d255]
- [framework] Fix argument parsing when no delimiters are specified ([@acdenisSK]) [c:628c1ea] [c:889540a]
- [misc] Fix unused import and deny unused items ([@nickelc]) [c:b1cc702]
- [misc] Fix broken links in the readme ([@nickelc]) [c:fe53b16]
Removed
- [misc] Remove unnecessary braces in use statement ([@nickelc]) [c:2f8e2b0]
- [voice] Remove unused code related to the former voice functionality ([@nickelc]) [c:97ef906]
- [examples] Remove unused
chronodependency in example 09 ([@acdenisSK]) [c:0450dde]
-
0.11.118 Apr 2022Release notes
Open source →This is a light release to fix compilation on https://docs.rs.
Thanks to the following for their contributions:
- [@acdenisSK]
Changed
- [misc] Manually specify list of features for docs.rs to build ([@acdenisSK]) [c:9f11a3f]
-
0.11.018 Apr 2022Release notes
Open source →Thanks to the following for their contributions:
- [@AldanTanneo]
- [@AngelOnFira]
- [@AnnikaCodes]
- [@acdenisSK]
- [@almeidx]
- [@Bloectasy]
- [@ben-brook]
- [@Chronophylos]
- [@devtomio]
- [@drklee3]
- [@FallenWarrior2k]
- [@Gentoli]
- [@GnomedDev]
- [@gradiuscypher]
- [@HarmoGlace]
- [@hybras]
- [@JellyWX]
- [@kangalio]
- [@Lakelezz]
- [@Licenser]
- [@MathyouMB]
- [@Milo123459]
- [@mkrasnitski]
- [@natto1784]
- [@nickelc]
- [@pascalharp]
- [@rasm47]
- [@Rstar284]
- [@Some-Dood]
- [@squili]
- [@TheBlackfurGuy]
- [@tylerd008]
- [@vaporoxx]
- [@vicky5124]
- [@xMAC94x]
- [@xfix]
Added
- [ci] Add build job to test the
native-tlsbackend ([@nickelc]) [c:440f0fa] - [model] Add new command data field
guild_id([@nickelc]) [c:4dbf3d0] - [model] Add new "Directory" channel type ([@nickelc]) [c:3b99eeb]
- [utils] Add
usersargument toutils::content_safe([@GnomedDev]) [c:c18e889] - [model] Add attachment support to interaction responses ([@GnomedDev]) [c:dc400de]
- [model] Add new audit change variant for
image_hashkey ([@nickelc]) [c:985212a] - [misc] Add
.git-blame-ignore-revsfile ([@nickelc]) [c:3a3e399] - [builder] Add function to
CreateInteractionResponseDatato set or unset the ephemeral flag ([@pascalharp]) [c:283af98] - [model] Add method to create
model::Timestampfrom a UNIX timestamp ([@nickelc]) [c:66f8be7] - [model] Add new message flag
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD([@nickelc]) [c:a75ac69] - [model] Add missing stuff for
GatewayIntents([@vaporoxx]) [c:14fc9c6] - [model] Add shorthand for checking the
GUILD_MESSAGESintent bitflag ([@Bloectasy]) [c:6f28486] - [model] Add
Webhook::get_messagefor retrieving messages sent by a webhook ([@GnomedDev]) [c:a2b388f] - [builder/model] Enable compilation of builder/interaction code without a backend ([@FallenWarrior2k]) [c:4cd6caa]
- [http] Support more options for querying invites ([@AnnikaCodes]) [c:c1ef6d9]
- [builder] Add components support to ExecuteWebhook and EditWebhookMessage ([@mkrasnitski]) [c:cb7f211]
- [http/gateway] Add support for v10 of Discord's HTTP API and Gateway ([@squili]) [c:5c6c72a]
- [model] Add
GenericIdsnowflake type for unspecific entities in audit logs ([@nickelc]) [c:146b1ac] - [model] Add support for the
Attachmentoption type ([@JellyWX]) [c:9866a85] - [model] Derive
CopyandClonetraits for the audit action enums ([@nickelc]) [c:dfac5d7] - [model] Provide parsing of RFC 3339 strings for
model::Timestamp([@nickelc]) [c:3aca5ca] - [builder] Add convenient methods for creating message components ([@nickelc]) [c:6476ed1]
- [model] Derive
Defaulttrait for all bitflags types ([@nickelc]) [c:92de3da] - [builder] Add support for
allowed_mentionsin theExecuteWebhookbuilder ([@mkrasnitski]) [c:71583c3] - [model] Add support for
localeandguild_localefields in interactions ([@Rstar284]) [c:b4d0765] - [model] Add
dataandfilenamemethods toAttachmentType([@mkrasnitski]) [c:ad9e987] - [builder] Support more integer types for min_value / max_value ([@kangalio]) [c:0da4ab5]
- [model] Add a common constructor for the different
ActivityTypes ([@nickelc]) [c:b4e4add] - [json] Expose more types and functions from
serde_jsonandsimd-json([@vicky5124]) [c:f61fae4] - [client] Add cache update calls to dispatched thread events ([@AngelOnFira]) [c:7e701dc]
- [model] Support application webhooks ([@vicky5124]) [c:2c73618]
- [model] Add
USE_EXTERNAL_STICKERSpermission and audit log support for stickers ([@drklee3]) [c:1fbf1e9] - [http] Allow sending files when creating and editing followup messages ([@acdenisSK]) [c:147ed03]
- [model/http] Add support for sticker packs, guild stickers, and sticker routes ([@drklee3]) [c:a88673f]
- [http] Add audit log reason support to most HTTP endpoints ([@kangalio]) [c:bec660d]
- [http] Integrate attachments into the
Requestsystem ([@drklee3]) [c:57582d2] - [http] Implement optional pagination for
Http::get_guilds([@tylerd008]) [c:06d101b] - [model] Add support for adding attachments in message edits ([@kangalio]) [c:27bf301]
- [framework] Add the name of the command to the
Dispatcherror hook ([@kangalio]) [c:c2130a8] - [misc] Add support for simd-json via a feature flag ([@Licenser]) [c:afb3c37]
- [model] Add basic support for forum channels ([@kangalio] [@TheBlackfurGuy]) [c:35ee68b]
- [model] Add missing method for converting
InteractiontoModalSubmitInteraction([@gradiuscypher]) [c:e187f73] - [builder] Add support to set a single child builder for several parent builders ([@natto1784]) [c:91ee596]
- [collector] Add modal submit collector ([@pascalharp]) [c:e5073ae]
- [client] Add a method to pass an
EventHandlerin anArcdirectly to theClient([@squili]) [c:16c2089] - [model] Add Modal Interactions and Input Text ([@pascalharp]) [c:92fe5bb]
- [builder] Add
set_componentstoEditMessage([@Chronophylos]) [c:57c0826] - [model] Add
message_idfield to audit log options for pinned/unpinned messages ([@nickelc]) [c:3a64da1] - [model] Add
add_membertoGuildandGuildId([@vaporoxx]) [c:82c2415] - [builder] Add support for
allowed_mentionsinEditMessage([@acdenisSK]) [c:86dbaee]
Changed
- [utils] Use
str::split_oncefor parsing webhooks and user tags ([@mkrasnitski]) [c:fbfe0cf] - [utils] Refactor and fix bugs in
utils::content_safe([@mkrasnitski]) [c:32cb31c] - [model] Move
misc::Mention{able}into their ownmodel/mentionmodule ([@mkrasnitski]) [c:f5458f1] - [client] Require setting gateway intents explicitly ([@kangalio]) [c:d245e67]
- [model] Update methods and properties of
Permissions([@devtomio]) [c:10410a2] - [http] Pass parsed token to
Ratelimiter::new()([@vaporoxx]) [c:f4f310d] - [http] Simplify constructor functions for
Http([@vaporoxx]) [c:f8bc937] - [model] Remove unnecessary
CacheHttprequirements ([@vaporoxx]) [c:a36353b] - [model] Update documentation around webhook components ([@mkrasnitski]) [c:6028072]
- [misc] Format imports with module granularity ([@nickelc]) [c:4c97810]
- [gateway] Set
Http::application_idin ready event handler ([@vaporoxx]) [c:c5f9cbe] - [misc] Switch to using URL over URI ([@vaporoxx]) [c:81a9bc2]
- [model] Deserialize the interaction data's
target_idunconditionally ([@nickelc]) [c:c5dc80b] - [model] Reduce size of the
ResolvedTargetenum variants ([@nickelc]) [c:404ab03] - [model] Change matches where the match expression is a bool to be more idiomatic ([@nickelc]) [c:977946f]
- [cache] Place temporary caching functionality under a separate feature flag ([@acdenisSK]) [c:d03809f]
- [misc] Make chrono a default optional feature ([@xfix]) [c:e69bcd3]
- [model] Clean up macro usage in
model::misc([@mkrasnitski]) [c:5a0e8f4] - [model] Alter
Guild::member_named's implementation to useutils::parse_user_tag([@mkrasnitski]) [c:8c9670f] - [utils] Make
ArgumentConvertcompatible without thecachefeature ([@kangalio]) [c:cdaa70c] - [model] Document that the
MESSAGE_CONTENTintent is now privileged ([@kangalio]) [c:63a1000] - [client] Use
Optionin more places in theClientBuilder([@vaporoxx]) [c:8bca94a] - [misc] Simplify the hidden preparation code in doc examples ([@nickelc]) [c:d67a21d]
- [model] Remove kind check for sending webhook components ([@GnomedDev]) [c:a292c2f]
- [model] Remove the
unstable_discord_apifeature guard from the application commands ([@nickelc]) [c:1ce8060] - [model] Turn the resolved target of the command interaction data into a method ([@nickelc]) [c:0036620]
- [model] Clean up API around Mention/Mentionable ([@mkrasnitski]) [c:28e6732]
- [examples] Use the new builder method for ephemeral messages in example ([@nickelc]) [c:aada1b9]
- [utils] Replace custom trait with
Into<Content>([@mkrasnitski]) [c:c9e4f27] - [model] Make the non-cache version of the
shard_idmethods synchronous ([@nickelc]) [c:787e7d9] - [model] Remove manual deserialization of
ApplicationCommandInteractionDataResolved([@nickelc]) [c:56cab22] - [ci] Pin the Rust version for the build jobs with the nightly toolchain ([@nickelc]) [c:36eac42]
- [model] Use
ApplicationFlagsbitflags in the application info structs ([@nickelc]) [c:33d402f] - [misc] Unify
std::fmtimports andDisplay&Debugtrait implementations ([@nickelc]) [c:7a8f2cf] - [misc] Update
parking_lotto 0.12 ([@xfix]) [c:d5b5970] - [misc] Update
async-tungsteniteto 0.17 ([@nickelc]) [c:4ff348e] - [misc] Increase MSRV to 1.53 ([@nickelc]) [c:87bb9a8]
- [misc] Put
tokio::task::Builderusage behind a feature flag ([@Milo123459]) [c:9624af0] - [cache] Temporarily cache users and channels in the
to_userandto_channelfunctions ([@Milo123459]) [c:1be625b] - [model] Rename the enum sub types of the audit log actions ([@nickelc]) [c:56c40fc]
- [model] Make the
model::guild::audit_logmodule public ([@nickelc]) [c:7d99bcb] - [collector] Make collector builders synchronous ([@vaporoxx]) [c:d640238]
- [model] Change the data mapping of
AuditLogs([@nickelc]) [c:7823b6e] - [model] Move the audit log serde modules into a separate
utilsmodule ([@nickelc]) [c:5a4fd2a] - [model] Change the audit log
Changestruct into an enum with the actual types ([@nickelc]) [c:594a00d] - [model] Rework the audit log serde module for optional integer strings ([@nickelc]) [c:74bffd0]
- [misc] Update
dashmapto v5.1.0 ([@acdenisSK] [@vicky5124] [@Some-Dood]) [c:6298f67] [c:342fdbb] [c:28e0311] - [model] Replace deserialization helper functions with the required types ([@nickelc]) [c:938936e]
- [model] Implement
serdetraits for the auditActionenum directly ([@nickelc]) [c:0f77d31] - [http] Refactor
HttpBuilderto avoidunwrapcalls ([@vaporoxx]) [c:89499b2] - [utils] Move token parse and validate functions into the
utils::tokenmodule ([@nickelc]) [c:97ea22f] - [model] Make certain embed fields optional ([@Chronophylos]) [c:daa9434]
- [utils] Move
utils::content_safeand dependants into its own module ([@nickelc]) [c:ab4e7fe] - [model] Replace manual deserialization of
VoiceStatewith helper structs ([@nickelc]) [c:14e747d] - [misc] Move macOS job out of the build job matrix ([@nickelc]) [c:23ed9ea]
- [builder] Avoid
Vecallocation by using the iterators directly ([@nickelc]) [c:4556594] - [builder] Change
emoijparameters in component builders toInto<ReactionType>([@nickelc]) [c:8fe7127] - [model] Deserialize Discord's status page responses with an interim struct ([@nickelc]) [c:a29e0f7]
- [framework] Replace levenshtein implementation with the
levenshteincrate ([@nickelc]) [c:5f6ad2a] - [framework] Use subslice patterns to improve code readablility ([@nickelc]) [c:08b7163]
- [model] Use the
is_falsefunction from themodel::utilsmodule ([@nickelc]) [c:5b43bdb] - [model] Use the internal
bitflags!macro forApplicationFlags([@nickelc]) [c:dd5661c] - [model] Replace the use of
DateTime<Utc>with a newtype structTimestamp([@nickelc]) [c:1577efc] - [model] Introduce internal
bitflags!macro with serde implementation ([@nickelc]) [c:4d5f4f1] - [misc] Decouple the minimal versions check from the
nightlybuild job ([@nickelc]) [c:fbba88c] - [http] Change the return type of
Route::stage_instancesto&'static str([@nickelc]) [c:a3dd38e] - [misc] Improve usage of the
api!macro ([@nickelc]) [c:a95ac81] - [cache] Move the implementations of
CacheUpdateinto thecache::eventmodule ([@nickelc]) [c:afba7f5] - [model] Use the
bitflags!macro instead of the undocumented macro ([@nickelc]) [c:701d759] - [model] Replace
GuildStatuswithUnavailableGuildin the ready event ([@nickelc]) [c:5063de1] - [model] Deserialize
Permissionswithout an extraStringallocation ([@nickelc]) [c:f26fb7f] - [model] Separate
Webhook::editinto three separate methods ([@mkrasnitski]) [c:1715476] - [model] Replace manual deserialization of
RoleTags([@nickelc]) [c:363a311] - [model] Replace (de)serialization implementation of bitflags with a macro ([@nickelc]) [c:bdf99b9]
- [model] Replace manual (de)serialization for single field gateway events ([@nickelc]) [c:599efc1]
- [model] Move
GuildWelcomeScreenand dependant types into a separate module ([@nickelc]) [c:bc46711] - [misc] Improve usage of the
cdn!macro ([@nickelc]) [c:9a2cce8] - [http] Remove manual deserialization of
DiscordJsonError([@nickelc]) [c:080f5b0] - [model] Move
GatewayIntentstomodel([@Gentoli]) [c:f46bbc8] - [http] Change methods on
Httpto take&JsonMapinstead ofJsonMap([@mkrasnitski]) [c:b1389aa] - [misc] Replace the
actions-rsGitHub actions with equivalent commands ([@nickelc]) [c:48de0e5] - [misc] Allow
clippy::unwrap_usedfor tests globally ([@nickelc]) [c:f9f6079] - [misc] Speed up the
Examplesbuild job by just checking instead of building ([@nickelc]) [c:34881b9] - [model] Refactor
GuildWelcomeChanneland dependant types ([@nickelc]) [c:dfe38c2] - [utils] Move the
hashmap_to_json_mapfunction into thejsonmodule ([@nickelc]) [c:34c484c] - [model] Move the event deserialization of
Rolecreation and update into a helper function ([@nickelc]) [c:25cdfeb] - [client] Streamline
EventHandlerby removing redundantguild_idparameters ([@nickelc]) [c:a5f9a4f] - [model] Deserialize the
GuildMembersChunkEventstruct manually ([@nickelc]) [c:ae93570] - [model] Move
User's discriminator de-/serialization into themodel::usermodule ([@nickelc]) [c:178f62c] - [model] Move Discord's snowflake de-/serialization into the
model::idmodule ([@nickelc]) [c:68d5049] - [model] Use serde's primitive integer deserializers for Discord's integer bitflags ([@nickelc]) [c:7a38ad1]
- [model] Use type inference in serde functions ([@nickelc]) [c:d504bf2]
- [misc] Change
matches where the match expression is a bool to be more idiomatic ([@nickelc]) [c:cb5d090] - [model] Reuse the
HashMapvalues serialization in the other serde modules ([@nickelc]) [c:5ce8177] - [model] Add serde visitor to deserialize sequences directly as hashmaps. ([@nickelc]) [c:e57433f]
- [model] Move serde functions into modules to be used with
#[serde(with = "...")]([@nickelc]) [c:173c1a6] - [misc] Increase MSRV to 1.51 ([@nickelc]) [c:590437b]
- [http] Convert
HttpBuilderto be synchronous ([@Some-Dood]) [c:fa68bb1] - [examples] Update dependencies in examples and the library ([@vicky5124]) [c:228ee8e]
- [model] Rename the
category_idfield of channel types toparent_id([@AldanTanneo]) [c:cf1a897] - [model] Rename
ApplicationCommandmessage type toChatInputCommand([@HarmoGlace]) [c:bc9315c] - [cache] Make the cache synchronous and switch to
DashMapin its internals ([@vicky5124]) [c:9e2b9df] - [model] Add fallback to HTTP for
Message::channel([@kangalio]) [c:c889c7e] - [framework] Change return signatures of help commands to return
Results ([@acdenisSK]) [c:a8cd62d] - [model] Make
Embed::colouranOption([@drklee3]) [c:5223ea0] - [model] Make
RichInvite::inviteroptional and replaceInviteUserwithUser([@acdenisSK]) [c:82e5095] - [misc] Update to
reqwestv0.11.7 andasync-tungstenitev0.16 ([@nickelc]) [c:c80084c] [c:d1a3ded] [c:a168913]
Fixed
- [misc] Fix minor issues with doc comments & examples ([@nickelc]) [c:d3ae156]
- [misc] Fix compilation error ([@nickelc]) [c:1dbe9f1]
- [misc] Fix clippy warnings suggested by
clippy::pedantic([@nickelc]) [c:f6a3700] - [model] Fix parsing interactions with DM channel argument ([@kangalio]) [c:f6c4db0]
- [misc] Fix
unused_importswarning ([@nickelc]) [c:a9d1919] - [ci] Fix typo in environment variable in
Publish docsbuild job ([@nickelc]) [c:11fff2f] - [http] Fix docstring of
Route::ChannelsIdMessagesId([@mkrasnitski]) [c:1a9bb54] - [misc] Fix usage of builder pattern across code, docs, and examples ([@mkrasnitski]) [c:36e0909]
- [builder] Clarify documentation for using components with webhooks ([@mkrasnitski]) [c:87f5bae]
- [model] Fix the mapping of the
Change::Typevariant ([@nickelc]) [c:3f93af8] - [model] Fix serialization of the role/user ID in
PermissionOverwrite([@nickelc]) [c:1f13d70] - [model] Fix broken resolving logic for
AttachmentType::Image([@mkrasnitski]) [c:0632019] - [model] Fix missing
communication_disabled_untildata in member update & chunk events ([@nickelc]) [c:bb638c0] - [misc] Fix & deny intra-doc links to private items ([@nickelc]) [c:86a5861]
- [misc] Fix unused import & function warnings for certain feature combinations ([@nickelc]) [c:6139a63]
- [misc] Fix clippy warnings ([@nickelc] [@acdenisSK]) [c:f724aec] [c:56a9fcb] [c:508864d] [c:2060cfb] [c:111f437]
- [model] Fix lifetime definitions for builders with attachments ([@acdenisSK]) [c:65c0122]
- [misc] Update
JOIN_MESSAGESconstant to be up to date ([@acdenisSK]) [c:6219fec] - [examples] Fix the
e09_create_message_builderexample when thetimefeature is enabled ([@nickelc]) [c:74f4396] - [model] Fix ID type deserialization from signed integers ([@nickelc]) [c:ba84c77]
- [misc] Allow feature combination
builder,unstable_discord_api([@Gentoli]) [c:eda64a6] - [model] Fix faulty (de)serialization of
ActivityFlags([@nickelc]) [c:1725627] - [model] Fix faulty (de)serialization of
MessageFlagsand missing constants ([@nickelc]) [c:1a0cc66] - [model] Fix the
EmojiIdserialization in theReactionTypeserialization ([@nickelc]) [c:5114d80] - [model] Replace some incorrect usage of
UserIdwithApplicationId([@kangalio]) [c:4b2c4d9] - [client] Update the cache when a thread is created, updated, or removed ([@xMAC94x]) [c:c95bcd3]
- [model] Fix serialisation and deserialisation of
Integration::synced_at([@vicky5124]) [c:983d0e4] - [model] Fix deserialisation of
PresenceUser'sdiscriminatorfield ([@acdenisSK]) [c:584d3a9] - [model] Return a proper error type for
EmojiIdentifier'sFromStrimpl ([@kangalio]) [c:faebd0c] - [model] Fix
Message::edit's lifetimes ([@acdenisSK]) [c:22a3f64] - [model] Correctly cache guild categories on add/delete/update ([@drklee3]) [c:3b2b18c]
- [model] Ensure
Activity::urlis a valid URL at a type-level ([@hybras]) [c:3f985b5] - [model] Alter deserialisation of
Presence::userto properly handle optional fields ([@kangalio]) [c:a3a861c] - [misc] Fix common spelling mistakes using
codespell([@acdenisSK]) [c:4eee51c] - [misc] Fix typo (
titel->title) ([@acdenisSK]) [c:519ea83] - [model] Update
communication_disabled_untilfield if cached member exists ([@drklee3]) [c:7a8adfb] - [model] Fix mention syntax of guild emojis ([@pascalharp]) [c:48ca506]
Removed
- [misc] Remove the
Error::Numenum variant ([@nickelc]) [c:2596927] - [any] Remove redundant
ClientBuilder::application_idfield ([@nickelc]) [c:d7ef273] - [misc] Remove the
Error::Rustlsenum variant ([@nickelc]) [c:8d3a079] - [framework] Remove unused
found_group_prefixparameter ([@vaporoxx]) [c:e283b51] - [misc] Remove unused
update_cache_timeoutfromCacheAndHttp([@vaporoxx]) [c:c2b9445] - [misc] Remove
*tls_backend_markerfeatures ([@vaporoxx]) [c:16661a3] - [client] Remove unused
client::Extrasstruct ([@nickelc]) [c:1ed7ac5] - [model] Remove sunsetted store channel type ([@nickelc]) [c:1976428] [c:8b21193]
- [misc] Remove superfluous error heading ([@nickelc]) [c:c92acfd]
- [model] Remove unused
ApplicationInfo&BotApplicationstructs ([@nickelc]) [c:1e427c6] - [misc] Remove
tokio0.2 compatibility ([@xfix]) [c:04a57c3] - [misc] Remove usage of
#[doc(cfg(...))]([@acdenisSK]) [c:602bcb6] - [model] Remove unused
model::guild::Targetenum ([@nickelc]) [c:b767215] - [model] Remove manual deserialization of
AuditLogs([@nickelc]) [c:16dcc69] - [misc] Remove deprecated
Error::descriptionimplementation ([@nickelc]) [c:63cdeec] - [http] Remove usage of
Arcforreqwest::Client([@vaporoxx]) [c:a1cdd7f] - [model] Remove the unused
Componentenum ([@nickelc]) [c:1e11fb4] - [misc] Remove deprecated fields, gateway events, endpoints and traits ([@nickelc]) [c:75062ae]
- [model] Remove workaround for serde_json's
arbitrary_precisionfeature ([@nickelc]) [c:bc77218] - [misc] Remove superfluous link reference definitions ([@nickelc]) [c:0bb6bb1] [c:d51b0b1]
- [model] Remove the manual deserialization of
Activity([@nickelc]) [c:4e7c60a] - [model] Remove obsolete
#[cfg(feature = "utils")]attributes on model methods ([@nickelc]) [c:0675fd1] - [model] Remove unused
NeverFailserror type ([@nickelc]) [c:5774572] - [client] Remove useless lifetime from
ClientBuilder([@kangalio]) [c:e6039c4] - [model] Remove the
VoiceRegion::vipfield ([@almeidx]) [c:e748deb] - [gateway] Remove
Shard::is_shutdown([@rasm47]) [c:0ccb793] - [framework] Remove
Boxindirection onframework. ([@Lakelezz]) [c:2f48379] - [model] Remove invalid
GuildChannel::send_messagenote ([@MathyouMB]) [c:73ff5ba] - [examples] Remove outdated reference to
kankyo::load()in example 06 ([@ben-brook]) [c:db101fd]
Release notes
Open source →Thanks to the following for their contributions:
- [@AldanTanneo]
- [@AngelOnFira]
- [@AnnikaCodes]
- [@acdenisSK]
- [@almeidx]
- [@Bloectasy]
- [@ben-brook]
- [@Chronophylos]
- [@devtomio]
- [@drklee3]
- [@FallenWarrior2k]
- [@Gentoli]
- [@GnomedDev]
- [@gradiuscypher]
- [@HarmoGlace]
- [@hybras]
- [@JellyWX]
- [@kangalio]
- [@Lakelezz]
- [@Licenser]
- [@MathyouMB]
- [@Milo123459]
- [@mkrasnitski]
- [@natto1784]
- [@nickelc]
- [@pascalharp]
- [@rasm47]
- [@Rstar284]
- [@Some-Dood]
- [@squili]
- [@TheBlackfurGuy]
- [@tylerd008]
- [@vaporox]
- [@vicky5124]
- [@xMAC94x]
- [@xfix]
Added
- [ci] Add build job to test the
native-tlsbackend ([@nickelc]) [c:440f0fa] - [model] Add new command data field
guild_id([@nickelc]) [c:4dbf3d0] - [model] Add new "Directory" channel type ([@nickelc]) [c:3b99eeb]
- [utils] Add
usersargument toutils::content_safe([@GnomedDev]) [c:c18e889] - [model] Add attachment support to interaction responses ([@GnomedDev]) [c:dc400de]
- [model] Add new audit change variant for
image_hashkey ([@nickelc]) [c:985212a] - [misc] Add
.git-blame-ignore-revsfile ([@nickelc]) [c:3a3e399] - [builder] Add function to
CreateInteractionResponseDatato set or unset the ephemeral flag ([@pascalharp]) [c:283af98] - [model] Add method to create
model::Timestampfrom a UNIX timestamp ([@nickelc]) [c:66f8be7] - [model] Add new message flag
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD([@nickelc]) [c:a75ac69] - [model] Add missing stuff for
GatewayIntents([@vaporox]) [c:14fc9c6] - [model] Add shorthand for checking the
GUILD_MESSAGESintent bitflag ([@Bloectasy]) [c:6f28486] - [model] Add
Webhook::get_messagefor retrieving messages sent by a webhook ([@GnomedDev]) [c:a2b388f] - [builder/model] Enable compilation of builder/interaction code without a backend ([@FallenWarrior2k]) [c:4cd6caa]
- [http] Support more options for querying invites ([@AnnikaCodes]) [c:c1ef6d9]
- [builder] Add components support to ExecuteWebhook and EditWebhookMessage ([@mkrasnitski]) [c:cb7f211]
- [http/gateway] Add support for v10 of Discord's HTTP API and Gateway ([@squili]) [c:5c6c72a]
- [model] Add
GenericIdsnowflake type for unspecific entities in audit logs ([@nickelc]) [c:146b1ac] - [model] Add support for the
Attachmentoption type ([@JellyWX]) [c:9866a85] - [model] Derive
CopyandClonetraits for the audit action enums ([@nickelc]) [c:dfac5d7] - [model] Provide parsing of RFC 3339 strings for
model::Timestamp([@nickelc]) [c:3aca5ca] - [builder] Add convenient methods for creating message components ([@nickelc]) [c:6476ed1]
- [model] Derive
Defaulttrait for all bitflags types ([@nickelc]) [c:92de3da] - [builder] Add support for
allowed_mentionsin theExecuteWebhookbuilder ([@mkrasnitski]) [c:71583c3] - [model] Add support for
localeandguild_localefields in interactions ([@Rstar284]) [c:b4d0765] - [model] Add
dataandfilenamemethods toAttachmentType([@mkrasnitski]) [c:ad9e987] - [builder] Support more integer types for min_value / max_value ([@kangalio]) [c:0da4ab5]
- [model] Add a common constructor for the different
ActivityTypes ([@nickelc]) [c:b4e4add] - [json] Expose more types and functions from
serde_jsonandsimd-json([@vicky5124]) [c:f61fae4] - [client] Add cache update calls to dispatched thread events ([@AngelOnFira]) [c:7e701dc]
- [model] Support application webhooks ([@vicky5124]) [c:2c73618]
- [model] Add
USE_EXTERNAL_STICKERSpermission and audit log support for stickers ([@drklee3]) [c:1fbf1e9] - [http] Allow sending files when creating and editing followup messages ([@acdenisSK]) [c:147ed03]
- [model/http] Add support for sticker packs, guild stickers, and sticker routes ([@drklee3]) [c:a88673f]
- [http] Add audit log reason support to most HTTP endpoints ([@kangalio]) [c:bec660d]
- [http] Integrate attachments into the
Requestsystem ([@drklee3]) [c:57582d2] - [http] Implement optional pagination for
Http::get_guilds([@tylerd008]) [c:06d101b] - [model] Add support for adding attachments in message edits ([@kangalio]) [c:27bf301]
- [framework] Add the name of the command to the
Dispatcherror hook ([@kangalio]) [c:c2130a8] - [misc] Add support for simd-json via a feature flag ([@Licenser]) [c:afb3c37]
- [model] Add basic support for forum channels ([@kangalio] [@TheBlackfurGuy]) [c:35ee68b]
- [model] Add missing method for converting
InteractiontoModalSubmitInteraction([@gradiuscypher]) [c:e187f73] - [builder] Add support to set a single child builder for several parent builders ([@natto1784]) [c:91ee596]
- [collector] Add modal submit collector ([@pascalharp]) [c:e5073ae]
- [client] Add a method to pass an
EventHandlerin anArcdirectly to theClient([@squili]) [c:16c2089] - [model] Add Modal Interactions and Input Text ([@pascalharp]) [c:92fe5bb]
- [builder] Add
set_componentstoEditMessage([@Chronophylos]) [c:57c0826] - [model] Add
message_idfield to audit log options for pinned/unpinned messages ([@nickelc]) [c:3a64da1] - [model] Add
add_membertoGuildandGuildId([@vaporox]) [c:82c2415] - [builder] Add support for
allowed_mentionsinEditMessage([@acdenisSK]) [c:86dbaee]
Changed
- [utils] Use
str::split_oncefor parsing webhooks and user tags ([@mkrasnitski]) [c:fbfe0cf] - [utils] Refactor and fix bugs in
utils::content_safe([@mkrasnitski]) [c:32cb31c] - [model] Move
misc::Mention{able}into their ownmodel/mentionmodule ([@mkrasnitski]) [c:f5458f1] - [client] Require setting gateway intents explicitly ([@kangalio]) [c:d245e67]
- [model] Update methods and properties of
Permissions([@devtomio]) [c:10410a2] - [http] Pass parsed token to
Ratelimiter::new()([@vaporox]) [c:f4f310d] - [http] Simplify constructor functions for
Http([@vaporox]) [c:f8bc937] - [model] Remove unnecessary
CacheHttprequirements ([@vaporox]) [c:a36353b] - [model] Update documentation around webhook components ([@mkrasnitski]) [c:6028072]
- [misc] Format imports with module granularity ([@nickelc]) [c:4c97810]
- [gateway] Set
Http::application_idin ready event handler ([@vaporox]) [c:c5f9cbe] - [misc] Switch to using URL over URI ([@vaporox]) [c:81a9bc2]
- [model] Deserialize the interaction data's
target_idunconditionally ([@nickelc]) [c:c5dc80b] - [model] Reduce size of the
ResolvedTargetenum variants ([@nickelc]) [c:404ab03] - [model] Change matches where the match expression is a bool to be more idiomatic ([@nickelc]) [c:977946f]
- [cache] Place temporary caching functionality under a separate feature flag ([@acdenisSK]) [c:d03809f]
- [misc] Make chrono a default optional feature ([@xfix]) [c:e69bcd3]
- [model] Clean up macro usage in
model::misc([@mkrasnitski]) [c:5a0e8f4] - [model] Alter
Guild::member_named's implementation to useutils::parse_user_tag([@mkrasnitski]) [c:8c9670f] - [utils] Make
ArgumentConvertcompatible without thecachefeature ([@kangalio]) [c:cdaa70c] - [model] Document that the
MESSAGE_CONTENTintent is now privileged ([@kangalio]) [c:63a1000] - [client] Use
Optionin more places in theClientBuilder([@vaporox]) [c:8bca94a] - [misc] Simplify the hidden preparation code in doc examples ([@nickelc]) [c:d67a21d]
- [model] Remove kind check for sending webhook components ([@GnomedDev]) [c:a292c2f]
- [model] Remove the
unstable_discord_apifeature guard from the application commands ([@nickelc]) [c:1ce8060] - [model] Turn the resolved target of the command interaction data into a method ([@nickelc]) [c:0036620]
- [model] Clean up API around Mention/Mentionable ([@mkrasnitski]) [c:28e6732]
- [examples] Use the new builder method for ephemeral messages in example ([@nickelc]) [c:aada1b9]
- [utils] Replace custom trait with
Into<Content>([@mkrasnitski]) [c:c9e4f27] - [model] Make the non-cache version of the
shard_idmethods synchronous ([@nickelc]) [c:787e7d9] - [model] Remove manual deserialization of
ApplicationCommandInteractionDataResolved([@nickelc]) [c:56cab22] - [ci] Pin the Rust version for the build jobs with the nightly toolchain ([@nickelc]) [c:36eac42]
- [model] Use
ApplicationFlagsbitflags in the application info structs ([@nickelc]) [c:33d402f] - [misc] Unify
std::fmtimports andDisplay&Debugtrait implementations ([@nickelc]) [c:7a8f2cf] - [misc] Update
parking_lotto 0.12 ([@xfix]) [c:d5b5970] - [misc] Update
async-tungsteniteto 0.17 ([@nickelc]) [c:4ff348e] - [misc] Increase MSRV to 1.53 ([@nickelc]) [c:87bb9a8]
- [misc] Put
tokio::task::Builderusage behind a feature flag ([@Milo123459]) [c:9624af0] - [cache] Temporarily cache users and channels in the
to_userandto_channelfunctions ([@Milo123459]) [c:1be625b] - [model] Rename the enum sub types of the audit log actions ([@nickelc]) [c:56c40fc]
- [model] Make the
model::guild::audit_logmodule public ([@nickelc]) [c:7d99bcb] - [collector] Make collector builders synchronous ([@vaporox]) [c:d640238]
- [model] Change the data mapping of
AuditLogs([@nickelc]) [c:7823b6e] - [model] Move the audit log serde modules into a separate
utilsmodule ([@nickelc]) [c:5a4fd2a] - [model] Change the audit log
Changestruct into an enum with the actual types ([@nickelc]) [c:594a00d] - [model] Rework the audit log serde module for optional integer strings ([@nickelc]) [c:74bffd0]
- [misc] Update
dashmapto v5.1.0 ([@acdenisSK] [@vicky5124] [@Some-Dood]) [c:6298f67] [c:342fdbb] [c:28e0311] - [model] Replace deserialization helper functions with the required types ([@nickelc]) [c:938936e]
- [model] Implement
serdetraits for the auditActionenum directly ([@nickelc]) [c:0f77d31] - [http] Refactor
HttpBuilderto avoidunwrapcalls ([@vaporox]) [c:89499b2] - [utils] Move token parse and validate functions into the
utils::tokenmodule ([@nickelc]) [c:97ea22f] - [model] Make certain embed fields optional ([@Chronophylos]) [c:daa9434]
- [utils] Move
utils::content_safeand dependants into its own module ([@nickelc]) [c:ab4e7fe] - [model] Replace manual deserialization of
VoiceStatewith helper structs ([@nickelc]) [c:14e747d] - [misc] Move macOS job out of the build job matrix ([@nickelc]) [c:23ed9ea]
- [builder] Avoid
Vecallocation by using the iterators directly ([@nickelc]) [c:4556594] - [builder] Change
emoijparameters in component builders toInto<ReactionType>([@nickelc]) [c:8fe7127] - [model] Deserialize Discord's status page responses with an interim struct ([@nickelc]) [c:a29e0f7]
- [framework] Replace levenshtein implementation with the
levenshteincrate ([@nickelc]) [c:5f6ad2a] - [framework] Use subslice patterns to improve code readablility ([@nickelc]) [c:08b7163]
- [model] Use the
is_falsefunction from themodel::utilsmodule ([@nickelc]) [c:5b43bdb] - [model] Use the internal
bitflags!macro forApplicationFlags([@nickelc]) [c:dd5661c] - [model] Replace the use of
DateTime<Utc>with a newtype structTimestamp([@nickelc]) [c:1577efc] - [model] Introduce internal
bitflags!macro with serde implementation ([@nickelc]) [c:4d5f4f1] - [misc] Decouple the minimal versions check from the
nightlybuild job ([@nickelc]) [c:fbba88c] - [http] Change the return type of
Route::stage_instancesto&'static str([@nickelc]) [c:a3dd38e] - [misc] Improve usage of the
api!macro ([@nickelc]) [c:a95ac81] - [cache] Move the implementations of
CacheUpdateinto thecache::eventmodule ([@nickelc]) [c:afba7f5] - [model] Use the
bitflags!macro instead of the undocumented macro ([@nickelc]) [c:701d759] - [model] Replace
GuildStatuswithUnavailableGuildin the ready event ([@nickelc]) [c:5063de1] - [model] Deserialize
Permissionswithout an extraStringallocation ([@nickelc]) [c:f26fb7f] - [model] Separate
Webhook::editinto three separate methods ([@mkrasnitski]) [c:1715476] - [model] Replace manual deserialization of
RoleTags([@nickelc]) [c:363a311] - [model] Replace (de)serialization implementation of bitflags with a macro ([@nickelc]) [c:bdf99b9]
- [model] Replace manual (de)serialization for single field gateway events ([@nickelc]) [c:599efc1]
- [model] Move
GuildWelcomeScreenand dependant types into a separate module ([@nickelc]) [c:bc46711] - [misc] Improve usage of the
cdn!macro ([@nickelc]) [c:9a2cce8] - [http] Remove manual deserialization of
DiscordJsonError([@nickelc]) [c:080f5b0] - [model] Move
GatewayIntentstomodel([@Gentoli]) [c:f46bbc8] - [http] Change methods on
Httpto take&JsonMapinstead ofJsonMap([@mkrasnitski]) [c:b1389aa] - [misc] Replace the
actions-rsGitHub actions with equivalent commands ([@nickelc]) [c:48de0e5] - [misc] Allow
clippy::unwrap_usedfor tests globally ([@nickelc]) [c:f9f6079] - [misc] Speed up the
Examplesbuild job by just checking instead of building ([@nickelc]) [c:34881b9] - [model] Refactor
GuildWelcomeChanneland dependant types ([@nickelc]) [c:dfe38c2] - [utils] Move the
hashmap_to_json_mapfunction into thejsonmodule ([@nickelc]) [c:34c484c] - [model] Move the event deserialization of
Rolecreation and update into a helper function ([@nickelc]) [c:25cdfeb] - [client] Streamline
EventHandlerby removing redundantguild_idparameters ([@nickelc]) [c:a5f9a4f] - [model] Deserialize the
GuildMembersChunkEventstruct manually ([@nickelc]) [c:ae93570] - [model] Move
User's discriminator de-/serialization into themodel::usermodule ([@nickelc]) [c:178f62c] - [model] Move Discord's snowflake de-/serialization into the
model::idmodule ([@nickelc]) [c:68d5049] - [model] Use serde's primitive integer deserializers for Discord's integer bitflags ([@nickelc]) [c:7a38ad1]
- [model] Use type inference in serde functions ([@nickelc]) [c:d504bf2]
- [misc] Change
matches where the match expression is a bool to be more idiomatic ([@nickelc]) [c:cb5d090] - [model] Reuse the
HashMapvalues serialization in the other serde modules ([@nickelc]) [c:5ce8177] - [model] Add serde visitor to deserialize sequences directly as hashmaps. ([@nickelc]) [c:e57433f]
- [model] Move serde functions into modules to be used with
#[serde(with = "...")]([@nickelc]) [c:173c1a6] - [misc] Increase MSRV to 1.51 ([@nickelc]) [c:590437b]
- [http] Convert
HttpBuilderto be synchronous ([@Some-Dood]) [c:fa68bb1] - [examples] Update dependencies in examples and the library ([@vicky5124]) [c:228ee8e]
- [model] Rename the
category_idfield of channel types toparent_id([@AldanTanneo]) [c:cf1a897] - [model] Rename
ApplicationCommandmessage type toChatInputCommand([@HarmoGlace]) [c:bc9315c] - [cache] Make the cache synchronous and switch to
DashMapin its internals ([@vicky5124]) [c:9e2b9df] - [model] Add fallback to HTTP for
Message::channel([@kangalio]) [c:c889c7e] - [framework] Change return signatures of help commands to return
Results ([@acdenisSK]) [c:a8cd62d] - [model] Make
Embed::colouranOption([@drklee3]) [c:5223ea0] - [model] Make
RichInvite::inviteroptional and replaceInviteUserwithUser([@acdenisSK]) [c:82e5095] - [misc] Update to
reqwestv0.11.7 andasync-tungstenitev0.16 ([@nickelc]) [c:c80084c] [c:d1a3ded] [c:a168913]
Fixed
- [misc] Fix minor issues with doc comments & examples ([@nickelc]) [c:d3ae156]
- [misc] Fix compilation error ([@nickelc]) [c:1dbe9f1]
- [misc] Fix clippy warnings suggested by
clippy::pedantic([@nickelc]) [c:f6a3700] - [model] Fix parsing interactions with DM channel argument ([@kangalio]) [c:f6c4db0]
- [misc] Fix
unused_importswarning ([@nickelc]) [c:a9d1919] - [ci] Fix typo in environment variable in
Publish docsbuild job ([@nickelc]) [c:11fff2f] - [http] Fix docstring of
Route::ChannelsIdMessagesId([@mkrasnitski]) [c:1a9bb54] - [misc] Fix usage of builder pattern across code, docs, and examples ([@mkrasnitski]) [c:36e0909]
- [builder] Clarify documentation for using components with webhooks ([@mkrasnitski]) [c:87f5bae]
- [model] Fix the mapping of the
Change::Typevariant ([@nickelc]) [c:3f93af8] - [model] Fix serialization of the role/user ID in
PermissionOverwrite([@nickelc]) [c:1f13d70] - [model] Fix broken resolving logic for
AttachmentType::Image([@mkrasnitski]) [c:0632019] - [model] Fix missing
communication_disabled_untildata in member update & chunk events ([@nickelc]) [c:bb638c0] - [misc] Fix & deny intra-doc links to private items ([@nickelc]) [c:86a5861]
- [misc] Fix unused import & function warnings for certain feature combinations ([@nickelc]) [c:6139a63]
- [misc] Fix clippy warnings ([@nickelc] [@acdenisSK]) [c:f724aec] [c:56a9fcb] [c:508864d] [c:2060cfb] [c:111f437]
- [model] Fix lifetime definitions for builders with attachments ([@acdenisSK]) [c:65c0122]
- [misc] Update
JOIN_MESSAGESconstant to be up to date ([@acdenisSK]) [c:6219fec] - [examples] Fix the
e09_create_message_builderexample when thetimefeature is enabled ([@nickelc]) [c:74f4396] - [model] Fix ID type deserialization from signed integers ([@nickelc]) [c:ba84c77]
- [misc] Allow feature combination
builder,unstable_discord_api([@Gentoli]) [c:eda64a6] - [model] Fix faulty (de)serialization of
ActivityFlags([@nickelc]) [c:1725627] - [model] Fix faulty (de)serialization of
MessageFlagsand missing constants ([@nickelc]) [c:1a0cc66] - [model] Fix the
EmojiIdserialization in theReactionTypeserialization ([@nickelc]) [c:5114d80] - [model] Replace some incorrect usage of
UserIdwithApplicationId([@kangalio]) [c:4b2c4d9] - [client] Update the cache when a thread is created, updated, or removed ([@xMAC94x]) [c:c95bcd3]
- [model] Fix serialisation and deserialisation of
Integration::synced_at([@vicky5124]) [c:983d0e4] - [model] Fix deserialisation of
PresenceUser'sdiscriminatorfield ([@acdenisSK]) [c:584d3a9] - [model] Return a proper error type for
EmojiIdentifier'sFromStrimpl ([@kangalio]) [c:faebd0c] - [model] Fix
Message::edit's lifetimes ([@acdenisSK]) [c:22a3f64] - [model] Correctly cache guild categories on add/delete/update ([@drklee3]) [c:3b2b18c]
- [model] Ensure
Activity::urlis a valid URL at a type-level ([@hybras]) [c:3f985b5] - [model] Alter deserialisation of
Presence::userto properly handle optional fields ([@kangalio]) [c:a3a861c] - [misc] Fix common spelling mistakes using
codespell([@acdenisSK]) [c:4eee51c] - [misc] Fix typo (
titel->title) ([@acdenisSK]) [c:519ea83] - [model] Update
communication_disabled_untilfield if cached member exists ([@drklee3]) [c:7a8adfb] - [model] Fix mention syntax of guild emojis ([@pascalharp]) [c:48ca506]
Removed
- [misc] Remove the
Error::Numenum variant ([@nickelc]) [c:2596927] - [any] Remove redundant
ClientBuilder::application_idfield ([@nickelc]) [c:d7ef273] - [misc] Remove the
Error::Rustlsenum variant ([@nickelc]) [c:8d3a079] - [framework] Remove unused
found_group_prefixparameter ([@vaporox]) [c:e283b51] - [misc] Remove unused
update_cache_timeoutfromCacheAndHttp([@vaporox]) [c:c2b9445] - [misc] Remove
*tls_backend_markerfeatures ([@vaporox]) [c:16661a3] - [client] Remove unused
client::Extrasstruct ([@nickelc]) [c:1ed7ac5] - [model] Remove sunsetted store channel type ([@nickelc]) [c:1976428] [c:8b21193]
- [misc] Remove superfluous error heading ([@nickelc]) [c:c92acfd]
- [model] Remove unused
ApplicationInfo&BotApplicationstructs ([@nickelc]) [c:1e427c6] - [misc] Remove
tokio0.2 compatibility ([@xfix]) [c:04a57c3] - [misc] Remove usage of
#[doc(cfg(...))]([@acdenisSK]) [c:602bcb6] - [model] Remove unused
model::guild::Targetenum ([@nickelc]) [c:b767215] - [model] Remove manual deserialization of
AuditLogs([@nickelc]) [c:16dcc69] - [misc] Remove deprecated
Error::descriptionimplementation ([@nickelc]) [c:63cdeec] - [http] Remove usage of
Arcforreqwest::Client([@vaporox]) [c:a1cdd7f] - [model] Remove the unused
Componentenum ([@nickelc]) [c:1e11fb4] - [misc] Remove deprecated fields, gateway events, endpoints and traits ([@nickelc]) [c:75062ae]
- [model] Remove workaround for serde_json's
arbitrary_precisionfeature ([@nickelc]) [c:bc77218] - [misc] Remove superfluous link reference definitions ([@nickelc]) [c:0bb6bb1] [c:d51b0b1]
- [model] Remove the manual deserialization of
Activity([@nickelc]) [c:4e7c60a] - [model] Remove obsolete
#[cfg(feature = "utils")]attributes on model methods ([@nickelc]) [c:0675fd1] - [model] Remove unused
NeverFailserror type ([@nickelc]) [c:5774572] - [client] Remove useless lifetime from
ClientBuilder([@kangalio]) [c:e6039c4] - [model] Remove the
VoiceRegion::vipfield ([@almeidx]) [c:e748deb] - [gateway] Remove
Shard::is_shutdown([@rasm47]) [c:0ccb793] - [framework] Remove
Boxindirection onframework. ([@Lakelezz]) [c:2f48379] - [model] Remove invalid
GuildChannel::send_messagenote ([@MathyouMB]) [c:73ff5ba] - [examples] Remove outdated reference to
kankyo::load()in example 06 ([@ben-brook]) [c:db101fd]
-
0.10.1022 Jan 2022Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@AldanTanneo]
- [@almeidx]
- [@Atakku]
- [@drklee3]
- [@Friz64]
- [@HarmoGlace]
- [@JellyWX]
- [@JohnTheCoolingFan]
- [@KaDiWa4]
- [@kafinsalim]
- [@kangalio]
- [@kristopherbullinger]
- [@lhjt]
- [@lo48576]
- [@mbenoukaiss]
- [@mdonoughe]
- [@Milo123459]
- [@mkrasnitski]
- [@nickelc]
- [@OverHash]
- [@pascalharp]
- [@Splingush]
- [@squili]
- [@Th3-M4jor]
- [@Vaimer9]
- [@vicky5124]
- [@woongzeyi]
Added
- [misc] Implement missing fields, methods, endpoints, and other values that are documented ([@vicky5124]) [c:be5cb54]
- [builder] Add a
timeoutdoc alias to various methods ([@Milo123459]) [c:1d05a1e] - [builder] Add support for enabling slowmode on thread creation ([@nickelc]) [c:69896e0]
- [ci] Add GitHub Actions workflow for labeling pull requests ([@nickelc]) [c:93b66d0]
- [model] Add
bannerandaccent_colorfields toUser([@drklee3]) [c:9e10d54] - [client] Add
get_*methods for manyClientBuilderfields ([@kangalio]) [c:90dae53] - [model] Add support for member timeout ([@kristopherbullinger]) [c:944cd54]
- [utils] Add
get_webhook_from_url([@mkrasnitski]) [c:b026f00] [c:6bd2f74] [c:7b89775] - [examples] Add an example for message components ([@pascalharp]) [c:ee00e92]
- [examples] Add step for installing
cargo maketo the Running Examples section ([@kafinsalim]) [c:47a297b] - [model] Add support for
min_valueandmax_valueto slash command options ([@kangalio]) [c:cfd518e] - [model] Add
SUPPRESS_JOIN_NOTIFICATION_REPLIESsystem channel flag ([@almeidx]) [c:6121fd0] - [model] Add support for Autocomplete interactions ([@Th3-M4jor]) [c:c322657]
- [misc] Format code in documentation comments ([@acdenisSK]) [c:5b84896]
- [client] Add a method to
ClientBuilderfor retrieving the current token ([@kangalio]) [c:6f87d25] - [utils] Add Discord's new branding, CSS & role colours ([@nickelc]) [c:c0463c0]
- [misc] Add
poiseto the "Projects extending Serenity" section ([@vicky5124]) [c:bfb5f13] - [model] Add channel types to application command options ([@vicky5124]) [c:5a700f7]
- [model] Add new audit log models for
STAGE_INSTANCE,STICKER, andTHREAD([@woongzeyi]) [c:0bc3ce0] - [model] Add
deferhelper methods for deferring interactions ([@Milo123459]) [c:d50628e] - [examples] Add a database example using SQLite ([@kangalio]) [c:02a5e15]
- [model] Add support for editing threads ([@lhjt]) [c:afeb76e]
- [ci] Use a better cache designed for Rust software in CI ([@Milo123459]) [c:c74162c]
- [examples] Add a simple web dashboard example ([@vicky5124]) [c:6c5aa4d]
- [model] Add new invite fields ([@vicky5124]) [c:cf4e216]
- [model] Add
ApplicationCommand::versionfield ([@HarmoGlace]) [c:c85d44a] - [http] Add the guild active threads endpoint ([@HarmoGlace]) [c:93d6ab8]
- [builder] Implement
From<Datetime>forTimestamp([@drklee3]) [c:b905554] - [command_attr] Add undocumented
#[required_permissions(perms)]requirements ([@woongzeyi]) [c:f9de6c5] - [http] Add paths to HTTP errors ([@Splingush]) [c:2da46a8]
- [builder] Add a
set_componentmethod to respective builders ([@JellyWX]) [c:99eba2b] - [model] Support context menus ([@HarmoGlace]) [c:e87293e]
- [model] Add
ContextMenuCommandmessage type ([@HarmoGlace]) [c:2a571d3]
Changed
- [model] Mark the
model::guild::GuildStatusenum as deprecated ([@nickelc]) [c:bd1342e] - [model] Suppress deprecation warning for the use of
Region([@nickelc]) [c:2dcb9b3] - [builder] Deprecate
slow_mode_rate/rate_limitmethods and field ([@nickelc]) [c:5c1e31e] - [builder] Update the notice about the max value for the "per user" ratelimit ([@nickelc]) [c:32f4430]
- [model] Mark the
model::guild::Regionenum as deprecated ([@nickelc]) [c:6d476cf] - [model] Improve the download of
Attachments by callingBytes::to_vec([@nickelc]) [c:f630f32] - [examples] Refactor examples 03 and 13 to better use the builder pattern ([@mkrasnitski]) [c:34c2f22]
- [examples] Refactor example 09 to more idiomatically use the builder pattern ([@mkrasnitski]) [c:4f7dad7]
- [misc] Increase MSRV to 1.51 ([@acdenisSK]) [c:04fc541]
- [model] Use the
write_allvariant in theAttachment::downloadexample ([@acdenisSK]) [c:a8b4e2f] - [misc] Use
Formatter::write_strdirectly instead ofwritelnfor string literals ([@nickelc]) [c:6a0106c] - [model] Use the permission flags for the
permissions::PRESET_*constants ([@nickelc]) [c:fc7c76a] - [model] Use bitshift notation for the values of Discord's bit flags ([@nickelc]) [c:57a2e4d]
- [model] Make the
u64value ofAttachmentIds public ([@nickelc]) [c:5379d3e] - [model] Simplify the
*Id::created_atmethod by usingUtc.timestamp_millis([@nickelc]) [c:1977e9f] - [misc] Set
rustfmtedition to match library edition ([@mkrasnitski]) [c:4f2a73b] - [misc] Remove old version of
timefrom dependency tree ([@KaDiWa4]) [c:d9c8980] - [framework] Change
Configuration::prefixto accept types that implementToString([@mkrasnitski]) [c:738465f] - [gateway] Remove guilds from cache if they were removed between a disconnect and a ready ([@squili]) [c:b21f053]
- [internal] Put the internal
tokiomodule behindtokio*features ([@nickelc]) [c:921ff6f] - [examples] Use
ClientBuilder::type_map_insertin examples where it makes sense ([@nickelc]) [c:c3358cf] - [examples] Simplify
tracing_subscriberinitialization in the examples ([@nickelc]) [c:46f7608] - [ci] Specify MSRV for clippy and use stable toolchain for the lint job ([@nickelc]) [c:bade6e5]
- [misc] Replace instances of
tokio::spawnwithspawn_named([@Milo123459] [@acdenisSK]) [c:5f81d4a] [c:247c073] [c:b2197db] - [voice] Replace some instances of
matchwith thematches!macro ([@Milo123459]) [c:6987175] - [utils] Fall back to
Memberparsing ifUseris not in the cache inArgumentConvert([@kangalio]) [c:6085aad] - [model] Define
Sticker::pack_idas optional ([@Atakku]) [c:cf040cb] - [model] Guarantee the
MessageComponentInteraction::messageto not be partial ([@HarmoGlace]) [c:f915fee]
Fixed
- [examples] Fix a typo in example 12 ([@Vaimer9]) [c:38b11da]
- [model] Fix documentation typo in
Message::crosspost([@OverHash]) [c:b180f21] - [model] Fix non-idiomatic comment ([@nickelc]) [c:f70112d]
- [model] Fix panic in
ReactionTypedeserialization ([@nickelc]) [c:fe946df] - [model] Fix faulty (de)serialization of
InteractionApplicationCommandDataFlags([@nickelc]) [c:62b9c84] - [model] Fix the example for
permissions::PRESET_GENERAL([@nickelc]) [c:707697e] - [command_attr] Fix
#[help]to generate its variables without an extra underscore ([@JohnTheCoolingFan]) [c:df47df1] - [model] Fix
Permissionsbitflags ([@AldanTanneo]) [c:0acabdf] - [misc] Make the library compilable with minimal dependency versions ([@lo48576]) [c:37e33bd]
- [model] Perform owner check when calculating permissions for a member ([@acdenisSK]) [c:ccf0d5b]
- [misc] Clean up Clippy errors ([@mdonoughe]) [c:2eeb336]
- [framework] Handle Unicode double-quote characters when parsing arguments ([@acdenisSK]) [c:9bfc1e7]
- [builder] Fix permission overwrites by sending Discord the correct overwrite types ([@woongzeyi]) [c:f36b4c1]
- [misc] Fix compilation without default features ([@nickelc]) [c:0611e2c]
- [framework] Check for discrepancies in default commands of groups ([@acdenisSK]) [c:cfbb7b3]
- [misc] Apply fixes by clippy ([@Milo123459]) [c:7e1a64e]
- [command_attr] Fix support for raw identifiers in
command_attr's macros ([@Friz64]) [c:5b7a23c] - [utils] Use the correct method for formatting an emoji in
MessageBuilderdocumentation ([@mbenoukaiss]) [c:eb29760] - [model] Make
CreateApplicationCommandPermissionspublic and fix documentation links ([@squili]) [c:7392f3f]
Removed
- [model] Remove unused
#[serde(deserialize_with = "..")]attribute ([@nickelc]) [c:e848af8] - [misc] Remove
#[tokio::test]from synchronous tests ([@nickelc]) [c:0d1c88e] - [utils] Remove unused function names from the
colour!macro ([@nickelc]) [c:096d1da]
-
0.10.915 Aug 2021Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@adumbidiot]
- [@Dinnerbone]
- [@drklee3]
- [@HarmoGlace]
- [@kangalio]
- [@KangarooCoder]
- [@kotx]
- [@MelonShooter]
- [@rasm47]
- [@sbrocket]
- [@Splingush]
- [@squili]
- [@vicky5124]
Added
- [model] Add model methods for creating public and private threads ([@acdenisSK]) [c:dbf4d68]
- [client/cache] Add support for defining cache settings in the
Clientbuilder. ([@Splingush]) [c:ea8ec29] - [builder] Add 'number' type to
ApplicationCommandOption([@Splingush]) [c:312ae16] - [collector] Add a generic collector for events ([@sbrocket]) [c:3117f1d]
- [model] Mention the type of event that failed to deserialise ([@acdenisSK]) [c:1d446fe]
- [model] Add methods to
Eventto get related user, guild, channel, and message IDs ([@sbrocket]) [c:0aa1a6c] - [model] Derive
PartialEq,Eq,PartialOrd,Ord, andHashforUserPublicFlags([@KangarooCoder]) [c:e7ba5bf] - [cache] Add method
Cache::channel_messages_field([@kangalio]) [c:ca02662] - [http/builder/model] Add support for generation of invite links with custom OAuth2 scopes ([@vicky5124]) [c:50cd285]
- [model] Switch to API v9 and add support for threads ([@HarmoGlace]) [c:4c53b48]
- [model] Add field
Guild::stage_instances([@HarmoGlace]) [c:13cf056] - [model] Support stage instances ([@HarmoGlace]) [c:3e6d131]
- [model] Add support for guild search members endpoint ([@drklee3]) [c:09b523d]
- [model] Add avatar field to member update event ([@drklee3]) [c:4f488f8]
- [http] Add support for fetching the current user's connections ([@Dinnerbone]) [c:6a400f9]
- [http] Allow passing bearer tokens to
Http::new_with_token([@squili]) [c:537753b] - [model] Add support for per guild avatars ([@drklee3]) [c:eb09d13]
- [builder] Support sending multiple embeds in a message ([@drklee3]) [c:e215c9d]
- [model] Add support to (Partial)Guild::nsfw_level ([@HarmoGlace]) [c:59ab451]
Changed
- [utils] Redesign the
Parsetrait and add support for most applicable model types ([@kangalio]) [c:eb14984] - [http] Include Discord's error explanations in
http::Error'sDisplayimplementation ([@kangalio]) [c:ce97f9e] - [model] Separate interaction stuctures per kind ([@HarmoGlace]) [c:2b2006c]
- [misc] Move workspace up to repo root, instead of under examples ([@sbrocket]) [c:46ace1f]
- [model] Clarify slash commands implementation ([@HarmoGlace]) [c:ae09e57]
- [builder] Improve implementations of embed methods on
Messagebuilders ([@kangalio]) [c:0be7d1a] - [model] Guarantee the
Interaction::userfield ([@HarmoGlace]) [c:9d18334]
Fixed
- [model] Make
GuildChannel::send_messagework in threads ([@kangalio]) [c:fb203ae] - [model] Fix broken
GuildChannelcollector functionality ([@kotx]) [c:413e3ef] - [model] Handle flags in
MessageUpdateEvent([@sbrocket]) [c:6192107] - [builder] Clear the flag when passing
falsetoEditMessage::suppress_embeds([@sbrocket]) [c:47b9afb] - [builder] Fix
cliend_idtypo ([@vicky5124]) [c:5cb9cb9] - [misc] Apply automatic clippy fixes ([@sbrocket]) [c:988bfcf]
- [model] Default certain select menu fields that might not be always present ([@HarmoGlace]) [c:87564a4]
- [collector] Lazily clone structs only when collector filters are actually matched ([@sbrocket]) [c:695bbef]
- [misc] Replace unnecessary guild cloning with cheaper alternatives ([@MelonShooter]) [c:fb83066]
- [misc] Fix and/or remove broken links in documentation comments ([@rasm47]) [c:504f5a4]
- [model] Skip serializating
Interaction'sOptionfields if they areNone([@sbrocket]) [c:c21f052] - [collector] Remove collectors that have closed receivers ([@drklee3]) [c:d3cf53a]
- [model] Update all cached guild fields on guild update ([@drklee3]) [c:7a7e8cc]
- [client/http] Fix validation error in the last step of
parse_token([@adumbidiot]) [c:3fba372] - [builder] Fix
CreateSelectMenuOption'sdescriptionmethod ([@HarmoGlace]) [c:cb30408] - [builder] Re-export forgotten builder types for select menus ([@acdenisSK]) [c:5d50c56]
-
0.10.812 Jun 2021Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@drklee3]
- [@Gabriel-Paulucci]
- [@HarmoGlace]
- [@JellyWX]
- [@kangalio]
- [@Lakelezz]
- [@Max2408]
- [@NotNorom]
- [@TehPers]
- [@Unoqwy]
- [@vicky5124]
Added
- [http] Implement
CacheHttpforHttp([@acdenisSK]) [c:5c9c194] - [model/builder/collector] Support components (buttons and dropdowns) ([@HarmoGlace]) [c:47a0a14]
- [model] Add support for
Activitybuttons ([@HarmoGlace]) [c:2635f7b] - [builder] Add
set_embedtoEditMessage([@Gabriel-Paulucci]) [c:073c22f] - [model] Add a
rolesmethod on GuildId for retrieving the guild's roles ([@JellyWX]) [c:38a39f5] - [model] Add new user flag for Discord Certified Moderator ([@Max2408]) [c:c60d504]
- [model] Add a few missing methods for (Partial)Guild ([@NotNorom]) [c:7c50e70]
Changed
- [client/gateway] Improve documentation of gateway intents ([@Lakelezz]) [c:b03d14b]
- [misc] Update Github/Gitlab username in README and CHANGELOG for vicky5124 ([@vicky5124]) [c:7b95b41]
- [client] Implement stricter
validate_tokenchecks ([@kangalio]) [c:132fd68]
Fixed
- [builder] Fix application command permission builder closures ([@HarmoGlace]) [c:1c7e98b]
- [misc] Prevent CI clippy errors ([@Unoqwy]) [c:a788fe2]
- [client] Remove early return when handling collector filters ([@drklee3]) [c:cbfd92b]
- [model] Fix embeds in interaction follow-up messages ([@TehPers]) [c:f7907ed]
- [client] Check existing
application_idofHttpwhen creating aClient([@drklee3]) [c:1744883] - [model] Fix being unable to mention additional users with
Message::reply(_ping)([@kangalio]) [c:22d2276] - [http] Fix paths in
DiscordJsonErrormessages ([@HarmoGlace]) [c:97c01ee] - [model] Apply the same fix from #1330 for
create_webhook_with_avatar([@JellyWX]) [c:d390ca1]
-
0.10.714 May 2021Release notes
Open source →Thanks to the following for their contributions:
- [@HarmoGlace]
Fixed
- [model/http] Fix GuildEmbed removal to avoid breaking change ([@HarmoGlace]) [c:822406e]
-
0.10.613 May 2021 withdrawnRelease notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@drklee3]
- [@HarmoGlace]
- [@kangalio]
- [@Lakelezz]
- [@legendofmiracles]
- [@mTvare6]
- [@nickelc]
- [@Sei4or]
- [@sudomann]
- [@vicky5124]
- [@zacck]
Added
- [model/gateway/client] Support command create, update, and delete events ([@HarmoGlace]) [c:aa9748e]
- [model] Support the
Team::namefield ([@HarmoGlace]) [c:07f15ad] - [model] Support getting interaction response, editing/deleting followup and flags ([@HarmoGlace]) [c:59bc14c]
- [model] Support mentionable application command option type ([@HarmoGlace]) [c:a710113]
- [builder] Support editing voice channel region and video quality mode ([@HarmoGlace]) [c:7983a8e]
- [model] Add support for all guild fields (welcome screen, rules channel, nsfw, etc.) ([@HarmoGlace]) [c:9b8a31a]
- [http] Support more detailed HTTP errors from Discord ([@HarmoGlace]) [c:f88355b]
- [model] Support member field on message reaction add event ([@HarmoGlace]) [c:879f193]
- [model] Support all interactions features ([@HarmoGlace]) [c:d6e86df]
- [model] Add role tags support ([@HarmoGlace]) [c:7b25308]
- [http] Add Discord API proxy support ([@drklee3]) [c:badb448]
- [model] Handle voice status (deaf, mute) in the
MemberUpdateevent ([@vicky5124]) [c:3a6eb58] - [model] Add the
content_typefield toAttachment([@vicky5124]) [c:1b17732] - [model] Add the invite reminder system message and flag ([@vicky5124]) [c:f238a46]
- [model] Add watching activity ([@vicky5124]) [c:47d9d1c]
- [model] Adds support to message crossposting ([@HarmoGlace]) [c:25ecaa6]
- [builder] Add a space in the example for
CreateEmbed::timestamp([@legendofmiracles]) [c:d0b404d]
Changed
- [model] Use
Permissionsinstead ofStringfor thePartialMember::permissionsfield ([@HarmoGlace]) [c:3b662e0] - [misc] Update link to Lavalink to account for the author's name change ([@mTvare6]) [c:7315d78]
- [model] Default to the
Unknownvariant for new model types ([@acdenisSK]) [c:cdbd14b] - [misc] Introduce intradoc-links in a lot of places ([@kangalio]) [c:b2565da]
- [misc] Update Discord guild badge ([@Lakelezz]) [c:5e5feea]
- [framework] Type check the return type of the body of async functions ([@acdenisSK]) [c:fa0bdd8]
- [examples] Rephrase documentation of
beforefor accuracy in the framework example ([@sudomann]) [c:392a534] - [model] Update the documentation for
Message::mention_channelswith constraints ([@zacck]) [c:8ab0800]
Fixed
- [model] Fix message link when Discord does not provide
guild_id([@HarmoGlace]) [c:01f70db] - [model] Fix webhook creation on news channel ([@HarmoGlace]) [c:f34c7bb]
- [misc] Fix clippy warnings ([@nickelc]) [c:6f30b0e]
- [http] Only deserialise the
DiscordJsonError::errorsfield if present ([@HarmoGlace]) [c:bab4d78] - [framework] Consider group restrictions when displaying command availability ([@acdenisSK]) [c:d508c35]
- [model] Silence warnings related to the deprecation of
(Partial)Guild::region([@acdenisSK]) [c:b995482] - [framework/client] Avoid cloning messages if the framework feature is disabled ([@acdenisSK]) [c:c7caedd]
- [client] Silence
dead_codelint forClientBuilder::token([@acdenisSK]) [c:8e13e74] - [misc] Remove debug tool ([@HarmoGlace]) [c:cfe5f01]
- [model] Fix misspelling of custom in
ActivityType's documentation ([@Sei4or]) [c:dca5c45]
Removed
- [builder] Remove useless
mutmodifiers in builder code ([@acdenisSK]) [c:9334af5]
-
0.10.504 Apr 2021Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@Daggy1234]
- [@drklee3]
- [@FelixMcFelix]
- [@kangalio]
- [@Lakelezz]
- [@miqbalrr]
Added
- [model] Add support for stage channels ([@drklee3]) [c:4018632]
- [http/model/builder] Allow editing and deleting messages from webhooks ([@acdenisSK]) [c:8d0b307]
- [model] Add support for
GuildChannel::{rtc_region, video_quality_mode}fields ([@drklee3]) [c:95c2f78] - [command_attr] Add a way for joining lines in
#[doc]comments using\$([@acdenisSK]) [c:dbc40cb] [c:cc184a4] - [model] Add
User::public_flagsfield ([@miqbalrr] [@acdenisSK]) [c:b999f46] [c:8ab0305] - [model] Add a
Parsetrait for some model types ([@kangalio]) [c:3088652] - [command_attr] Add documentation for the
#[hook]macro ([@acdenisSK]) [c:412f5a9] - [model] Add new Emoji fields and adjust existing ones ([@acdenisSK]) [c:8dfd97d]
- [model] Apply changes to interaction response types and add a new interaction type ([@acdenisSK]) [c:eba755c]
Changed
- [builder] Update
EditGuildto match current Discord API ([@Lakelezz]) [c:feda47c] - [misc] Signify code that needs the
collectorfeature ([@acdenisSK]) [c:a04291f] - [framework] Make the
Suggestions::{as_vec, join}methods public ([@Daggy1234]) [c:4186996] - [gateway] Alter
Activityconstructor methods to useToString([@acdenisSK]) [c:859355c] - [model] Improve conformity and fix updating certain fields for
Member([@acdenisSK]) [c:909bf8e]
Fixed
- [command_attr] Fix a case of iterator invalidation when moving
#[doc]attributes ([@acdenisSK]) [c:166c248] - [http] Escape hashes in HTTP reaction methods ([@acdenisSK]) [c:17233a2]
- [gateway] Reconnect in event of failed ShardActions ([@FelixMcFelix]) [c:03dd250]
- [framework] Do not invoke the help command in DMs if
allow_dmis false ([@acdenisSK]) [c:16e7556] - [examples] Fix tracing compilation error in example 7 ([@acdenisSK]) [c:3aa6aae]
-
0.10.403 Mar 2021Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
Fixed
- [misc] Fix invalid usage of
#[doc(cfg)]([@acdenisSK]) [c:b192609]
-
0.10.303 Mar 2021Release notes
Open source →Thanks to the following for their contributions:
- [@AriusX7]
- [@acdenisSK]
- [@aria-7553]
- [@baeuric]
- [@cab404]
- [@Daggy1234]
- [@DrBluefall]
- [@dapper-gh]
- [@drklee3]
- [@drp19]
- [@Lakelezz]
- [@lapin-b]
- [@merlleu]
- [@nickelc]
- [@Prof-Bloodstone]
- [@SinsofSloth]
- [@s0lst1ce]
- [@Th3-M4jor]
Added
- [framework/command_attr] Rename
#[doc]attributes to#[description]for groups ([@acdenisSK]) [c:1cbc935] - [model] Add missing variants to
MessageType([@merlleu]) [c:8f38985] [c:e5ae947] - [model] Add Requiring Guild Presences Intent Note ([@drklee3]) [c:136adef]
- [misc] Add clippy lint to deny let underscore binding of values which must be used ([@Th3-M4jor]) [c:53d5007]
- [misc] Add clippy lint for denying missing error documentation ([@Th3-M4jor]) [c:dcc1ac4]
- [framework] Document help-macro attributes
#[lacking_conditions]and#[wrong_channel]([@aria-7553]) [c:8931c4c] - [model] Add new fields for the
Membermodel ([@acdenisSK]) [c:810b033] - [misc] Add a clippy lint for denying the usage of
unwrap()([@Th3-M4jor]) [c:3f93c87] - [model] Add interaction create methods to
Guild,GuildId,PartialGuild, andInteraction([@Th3-M4jor]) [c:abfbb9f] - [builder] Allow adding permissions when editing a channel ([@baeuric]) [c:abe955f]
- [builder] Add builders for creating interactions ([@Th3-M4jor]) [c:0d743fd]
- [client] Allow users to reuse
Httpwhen building theClient([@acdenisSK]) [c:0e2b648] - [builder] Add builders for interaction responses ([@SinsofSloth]) [c:835e826]
Changed
- [model] Ignore Missing Cache Items on Permission Checks ([@Lakelezz]) [c:2812236] [c:75b404a]
- [framework] Capture sub-commands and aliases in
similar_commands([@Lakelezz]) [c:5892db2] - [framework] Handle nested sub-commands in help ([@Lakelezz]) [c:3db32fb]
- [model] Don't require the
cachefeature forMembersIterandGuildId::members_iter([@AriusX7]) [c:4ed30c3] - [misc] Bump dependencies to make them build with minimal versions ([@nickelc]) [c:53b2dc5]
- [misc] Update to
tracing0.1.23 ([@nickelc]) [c:2a21347] - [builder] Use vectors for passing permissions in the builders' documentation ([@acdenisSK]) [c:2e50a12]
- [misc] Update the contributing guide to reflect the state of the project ([@acdenisSK]) [c:7e8620f]
- [model] Change the type of the
embedsfield inMessageUpdateEventback toEmbed([@cab404]) [c:8133a43] - [misc] Enable the
logfeature fortracing([@DrBluefall]) [c:73e6d8a] - [examples] Make
ShardManagerContainerin thee06_sample_bot_structureexample public ([@Daggy1234]) [c:dfd0b32] - [misc] Format the repository and add a workflow for formatting and linting ([@acdenisSK]) [c:9bbb25a]
- [client] Ignore the
msgparameter when creating a tracing span ([@acdenisSK]) [c:cb6b528]
Fixed
- [model] Fix the type of
tokenand add fieldkindtoWebhook([@acdenisSK]) [c:de72951] - [framework] Skip the
Availablesegment in help if empty. ([@Lakelezz]) [c:6b6e5fe] - [model] Check if Private Channel Before Returning
NotAuthor([@Lakelezz]) [c:1ab52a0] - [framework/command_attr] Preserve documentation comments for the help command ([@acdenisSK]) [c:83360f8]
- [model] Fix typo on
MessageCollector([@s0lst1ce]) [c:291e4f2] - [model] Fix outdated link to example 5 in
Client::data's documentation ([@aria-7553]) [c:2be89e2] - [framework] Add missing verb 'be' in
Configuration::no_dm_prefix's documentation ([@aria-7553]) [c:4477690] - [examples] Update comments in the 7th example to mention
tracing([@acdenisSK]) [c:10de463] - [misc] Fix commit links for the v0.9.3 release ([@acdenisSK]) [c:5457cda]
- [gateway] Fix
WebSocketGatewayClientExt::send_chunk_guildto not get disconnected by Discord's gateway ([@lapin-b]) [c:2f835a3] - [gateway] Fix token logging from
WebSocketGatewayClientExt::send_resume([@Prof-Bloodstone]) [c:2854e6b] - [builder] Fix a typo in the create interaction builder ([@drp19]) [c:5254e2b]
- [examples] Fix the owner check in the
e05_command_frameworkexample ([@dapper-gh]) [c:e59314e]
-
0.10.209 Jan 2021Release notes
Open source →Thanks to the following for their contributions:
- [@Lakelezz]
- [@nickelc]
Added
- [misc] Add compatibility features for tokio
0.2and1.0([@Lakelezz]) [c:580d6de]
Fixed
- [misc] Fix doc_cfg attributes for the
unstable_discord_apifeature ([@nickelc]) [c:9a97f9b]
-
0.10.107 Jan 2021Release notes
Open source →Thanks to the following for their contributions:
- [@nickelc]
Fixed
- [misc] Bump the required version of the
command_attrcrate ([@nickelc]) [c:ab8c82b]
-
0.10.006 Jan 2021Release notes
Open source →Thanks to the following for their contributions:
- [@AgathaSorceress]
- [@acdenisSK]
- [@Baev1]
- [@casey]
- [@chocological00]
- [@Daggy1234]
- [@drklee3]
- [@FelixMcFelix]
- [@ikkerens]
- [@JellyWX]
- [@james7132]
- [@KamranMackey]
- [@Lakelezz]
- [@LavaToaster]
- [@nickelc]
- [@peppizza]
- [@SadiinsoSnowfall]
- [@SinsofSloth]
- [@sam-kirby]
- [@Th3-M4jor]
- [@ThatsNoMoon]
- [@thebongy]
- [@Wolvereness]
Added
- [client/voice] Document VoiceGatewayManager interface ([@FelixMcFelix]) [c:7647e1e]
- [misc] Describe the
unstable_discord_apifeature ([@acdenisSK]) [c:0b1fc27] - [gateway] Log unhandled errors when handling events in the gateway ([@LavaToaster]) [c:2e8f968]
- [model/http] Add Slash Command Gateway and REST API Support ([@Baev1]) [c:649f8f2]
- [framework] Add Max Delay Limits, Delay Hook, and
RateLimitInfo([@Lakelezz]) [c:aed3886] - [model] Add partial application information to the Ready event. ([@KamranMackey]) [c:d4caf12]
- [model] Add Default Limit And Validate When Fetching Members ([@SadiinsoSnowfall]) [c:f1204a8]
- [model] Add Guild::banner_url() and support animated guild icons via Guild::icon_url() ([@drklee3]) [c:2ef6da8]
- [model] Add sync_id and session_id fields to Activity. ([@KamranMackey]) [c:6240625]
- [framework] Add Reverting and Awaiting Bucket Rate Limits ([@Lakelezz]) [c:1589475]
- [model] Add support for stickers ([@drklee3]) [c:1b4d408]
- [framework] Support custom colours in the help command attributes ([@acdenisSK]) [c:fb1f0bf]
- [model] Add a helper method for partial comparing unicode reaction emojis ([@Th3-M4jor]) [c:46c74e9]
- [framework] Add summary as a brief description for groups ([@Lakelezz]) [c:ce66f8e]
- [framework] Add support for displaying sub-commands in plaintext help ([@KamranMackey]) [c:977fa19]
- [framework] Implement the
DisplayandErrortraits for the checkReason([@peppizza]) [c:2c9c64f] - [model] Add a helper method for comparing unicode reaction emojis ([@Th3-M4jor]) [c:0de77e7]
- [framework] Add sub-command support to help ([@Lakelezz]) [c:707752c]
- [model] Add functions to use inlined replies on
Message([@Lakelezz]) [c:35c8f7b] - [model] Implement inline replies ([@ikkerens]) [c:e521849]
- [voice] Implement Songbird driver configuration ([@FelixMcFelix]) [c:4fdbe98]
- [model] Add
guild_id,member, andself_videofields to VoiceState model ([@sam-kirby]) [c:7034564] - [http] Allow sending files with webhooks ([@JellyWX]) [c:99c27fe]
- [model] Add associated constants to
EventTypeand conversion methods betweenEvent([@casey]) [c:f3e4a6b]
Changed
- [model] Change
Mentionableto return a struct that implementsDisplay([@Wolvereness]) [c:2624170] - [misc] Update to tokio 1.0 and reqwest 0.11 ([@nickelc]) [c:a27d7bb]
- [model] Point to
User::nick_ininMessage::author_nick's documentation ([@Wolvereness]) [c:51dc943] - [model] Improve permission checking ([@ThatsNoMoon]) [c:dbb3669]
- [model] Change signatures of
Emojimethods to requireCacheandHttp. ([@Lakelezz]) [c:6aa2841] - [model] Check @ everyone and user permission overwrites for uncached users ([@ThatsNoMoon]) [c:12d1b22]
- [framework] Rework buckets to offer fine-grained control ([@Lakelezz]) [c:309bd5d]
- [framework] Clarify framework configuration dynamic_prefix docs ([@drklee3]) [c:0ca5813]
- [framework] Remove only one leading space in command descriptions ([@acdenisSK]) [c:216d579]
- [misc] Increase MSRV to 1.48 ([@acdenisSK]) [c:e74fd6f]
- [docs] Replace links with intra-doc links ([@nickelc]) [c:69cae50]
- [framework] Replace
CheckResultwith a simpleResult<(), Reason>([@Lakelezz]) [c:6e39727] - [model] Switch from
u64tousizeto represent overflow in a message ([@SadiinsoSnowfall]) [c:b7b0318] - [example] Make the
ShardManagerContainertype in example 6 public ([@Daggy1234]) [c:59e09d0] - [model] Expose guild id in the message delete event handlers ([@SadiinsoSnowfall]) [c:08bd87f]
- [voice] Move songbird and examples relying on it to the new repository ([@acdenisSK]) [c:be6eefe]
- [voice] Update versions for twilight and serenity-voice-model in songbird ([@FelixMcFelix]) [c:b3a71db]
- [model/framework] Retrieve the member from HTTP if missing in cache when calculating permissions ([@JellyWX]) [c:6dd66e1]
- [docs] Update the version in lib.rs to rely on any patch version in 0.9 ([@acdenisSK]) [c:1606e09]
- [misc] Credit the real author of the Serenity.await commit ([@acdenisSK]) [c:2587e6a]
- [voice] Document intents for Songbird ([@FelixMcFelix]) [c:49be2ab]
- [framework] Apply cooked attributes on generated functions ([@acdenisSK]) [c:879ae4b]
- [misc] Bump MSRV to 1.43.0 ([@nickelc]) [c:477925f]
- [model] Change the use of the
#[doc]attribute onVerificationLevelto doc comments ([@nickelc]) [c:2b1e2fc] - [gateway] Use the info level when notifying the user that a shard is running ([@acdenisSK]) [c:49ebbd7]
- [client/gateway/http/model] Introduce initial changes for v8 of the gateway ([@james7132]) [c:d74a0a6]
- [voice] Voice Rework -- Events, Track Queues ([@FelixMcFelix]) [c:fd6f08b]
- [misc] Reduce size of the crate by only including files that are necessary ([@nickelc]) [c:a836180]
Fixed
- [http] Fix local ratelimit bug ([@chocological00] [@Lakelezz]) [c:3d56a57] [c:4f07798]
- [http] Fix path to the HTTP endpoint of interaction responses ([@SinsofSloth]) [c:fcb1daa]
- [model] Fix deserialization of interactions ([@acdenisSK]) [c:b42591c]
- [model] Fix doc comments for
ReactionCollector([@Th3-M4jor]) [c:7684323] - [model] Fix the stated order of
ChannelId::messages_iter([@acdenisSK]) [c:03a1f97] - [model] Use
ApplicationIdinstead ofu64inMessageApplication(#1158) ([@sam-kirby]) [c:66e7add] - [model] Use guild splash hash for splash_url() instead of icon hash ([@drklee3]) [c:d3ab6a7]
- [model/http] Handle 200 Response when modifying Members on API v8 ([@drklee3]) [c:8471f5b]
- [framework] Check for discrepancies in prefixless groups ([@acdenisSK]) [c:692e984]
- [framework] Check a sub-command's parent first. ([@Lakelezz]) [c:20043d4]
- [model] Percent encode audit log reasons to prevent missing characters or truncation ([@drklee3]) [c:02916dc]
- [model] Reverse the message buffer before returning messages from it ([@acdenisSK]) [c:e49fae4]
- [misc] Fix clippy warnings ([@nickelc]) [c:a7ab03e] [c:7ad3abe] [c:a42bba2] [c:3282d77]
- [model] Fix voice region deserialization ([@KamranMackey]) [c:ba85299]
- [framework] Avoid cloning the entire guild object upon a command invocation ([@acdenisSK]) [c:ac23e19]
- [framework] Fix typo in check-docs. ([@Lakelezz]) [c:5fea8e4]
- [example] Fix typo of the strikethrough option in the framework example ([@thebongy]) [c:177adbf]
- [model] Fix url for animated emojis in
EmojiIdentifier([@AgathaSorceress]) [c:e8ae00f] - [model] Use the correct bits for privileged intents ([@FelixMcFelix]) [c:2225c8d]
- [voice] Handle Voice close codes, prevent Songbird spinning WS threads ([@FelixMcFelix]) [c:79c506e]
- [model] Fix serialization of
PermissionOverwrites ([@acdenisSK]) [c:8fb18e6] - [model] Correctly set gateway to v8 and fix
Permissiondeserialisation ([@FelixMcFelix]) [c:b1bcc67] - [framework] Allow missing documentation for generated statics and functions ([@acdenisSK]) [c:9cc30c3]
Removed
- [misc] Remove
#[deprecated]items. ([@Lakelezz]) [c:aca54ac] - [client] Remove unused event handlers for groups ([@acdenisSK]) [c:52f9dca]
- [framework/command_attr] Remove unnecessary
extern crateincommand_attr([@acdenisSK]) [c:d6984a8] - [framework/command_attr] Remove recursion limit in
command_attr([@acdenisSK]) [c:4729f26] - [misc] Remove remaining instances of private
_nonexhausivefields ([@KamranMackey]) [c:ac66a54]
-
0.9.407 Jan 2021Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
Fixed
- [misc] Fixate
command_attrversion to 0.3.2 ([@acdenisSK]) [c:b03df91]
-
0.9.318 Dec 2020Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@Lakelezz]
- [@SadiinsoSnowfall]
Added
- [command_attr/framework] Support custom colours in the help command attributes ([@acdenisSK]) [c:1cc66b3]
Fixed
- [framework] Fix invocation by defaulting ticket limit to 1. ([@Lakelezz]) [c:1047eac]
- [framework] Fix handling sub-commands in the help-system. Adds an example command with sub-command to the command framework example as well. ([@Lakelezz]) [c:fac94f2]
- [framework] Fix not setting
set_timeby default. ([@Lakelezz]) [c:5399d44] - [framework] Check for discrepancies in prefixless groups ([@acdenisSK]) [c:75feff2]
- [command_attr/framework] Remove only one leading space in command descriptions ([@acdenisSK]) [c:8f5a2e9]
- [model] Reverse the message buffer before returning messages from it ([@acdenisSK]) [c:1dba16a]
- [model] Fix incorrect documentation for the
MessageTooLongerror ([@SadiinsoSnowfall]) [c:8b42790]
-
0.9.228 Nov 2020Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
Changed
- [misc] Update the version in lib.rs to rely on any patch version in 0.9 ([@acdenisSK]) [c:85e5722]
- [misc] Credit the real author of the Serenity.await commit ([@acdenisSK]) [c:757e0d6]
Fixed
- [framework] Avoid cloning the entire guild object upon a command invocation ([@acdenisSK]) [c:bc78991]
- [model] Only add roles that the member does not possess when calling
Member::add_roles([@acdenisSK]) [c:e6fd09b]
-
0.9.108 Nov 2020Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@nickelc]
Changed
- [gateway] Use the info level when notifying the user that a shard is running ([@acdenisSK]) [c:7ea8098]
- [command_attr] Allow missing documentation for generated statics and functions ([@acdenisSK]) [c:182ee78]
- [model] Change the use of the
#[doc]attribute onVerificationLevelto doc comments ([@nickelc]) [c:58e3d49] - [misc] Reduce size of the crate by only including files that are necessary ([@nickelc]) [c:a836180]
Fixed
- [command_attr] Apply cooked attributes on generated functions ([@acdenisSK]) [c:61597d6]
-
0.9.030 Oct 2020Release notes
Open source →Thanks to the following for their contributions:
- [@james7132]
- [@JellyWX]
- [@Qeenon]
- [@vicky5124]
Added
- [client] Mention the required intents for certain events ([@vicky5124]) [c:c9971b6]
- [gateway] Add support for filtering by user ids when requesting guild chunks ([@james7132]) [c:0d9b821]
Changed
- [gateway] Change
Shard::chunk_guildstochunk_guild([@james7132]) [c:50d9643] - [framework] Use
~as a default command prefix ([@Qeenon]) [c:d9e9bf7] - [utils] Make
utils::shard_idaccept the guild id withimpl Into<u64>([@JellyWX]) [c:85b5489]
-
0.9.0-rc.424 Oct 2020 pre-releaseRelease notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
Changed
- [misc] Increase the type length limit ([@acdenisSK]) [c:7e55a0e]
-
0.9.0-rc.323 Oct 2020 pre-releaseRelease notes
Open source →Thanks to the following for their contributions:
- [@AriusX7]
- [@acdenisSK]
- [@Baev1]
- [@Flat]
- [@FelixMcFelix]
- [@ikkerens]
- [@leumasme]
- [@MonliH]
- [@nickelc]
- [@Prof-Bloodstone]
- [@peppizza]
- [@Qeenon]
- [@TheElec]
- [@tmcarr]
- [@u5surf]
- [@vicky5124]
Added
- [misc] Switch to Github Actions ([@acdenisSK]) [c:5bb8342] [c:a1b3c8d]
- [model] Add missing fields to
GuildMembersChunkEventand add nonce toShardMessenger::chunk_guilds([@TheElec]) [c:8c30b40] - [model] Implement
create_inviteonChannelId([@acdenisSK]) [c:c0c2137] - [client] Derive
CloneforCacheAndHttp([@acdenisSK]) [c:2b66828] - [examples] Update example 07 to use tracing and dotenv ([@vicky5124]) [c:2386690]
- [examples] Add Parallel Loops example. ([@vicky5124]) [c:b38cdf5]
- [examples] Add an example for client data. ([@vicky5124]) [c:3fe8056]
- [http] Add methods to the http error type to query the presence of variants and to return the status code ([@Baev1]) [c:7ef12ee]
- [http] Add methods to start and stop typing ([@AriusX7]) [c:bcf8249]
Changed
- [examples] Gracefully shutdown all shards upon receiving Ctrl-C in example 7 ([@peppizza]) [c:860a2c5]
- [misc] Update and reduce dependencies ([@nickelc]) [c:bba7d55] [c:35e2a40] [c:6577838]
- [examples] Replace several instances of
if let Errwith?in example 5 ([@peppizza]) [c:b1187ce] - [examples] Use the
writeln!macro instead ofwrite!in example 5 ([@peppizza]) [c:c6150ae] - [http] Prevent discord token from being logged ([@Prof-Bloodstone]) [c:5cc67c3]
- [misc] Replace instances of
super::superwith absolute imports ([@nickelc]) [c:47e2f34] - [examples] Directly link
TypeMapto its crate ([@nickelc]) [c:519b67e] - [builder] Allow setting the embed builders directly ([@Prof-Bloodstone]) [c:b522e83]
- [model] Change order rules of MessagesIter from new to old ([@Qeenon]) [c:aa589da]
- [voice] Limit
tokio/processandtokio/udpto the voice feature ([@nickelc]) [c:d514806] - [misc] Update
base64andtypemap_revdependencies to their latest versions ([@Qeenon]) [c:ebd1241] - [examples] Update example 05 to specifically get the current bot id ([@Flat]) [c:de085ff]
- [voice] Update voice cipher to the latest version ([@FelixMcFelix]) [c:87df95f]
- [framework] Change the default help text to use the word 'server' ([@acdenisSK]) [c:f0cfc0e]
Fixed
- [examples] Fix a typo in the examples' README ([@leumasme]) [c:186fd6c]
- [examples] Fix a small typo in example 14 ([@MonliH]) [c:3467ddc]
- [model] Deserialize the correct data from the
GUILD_DELETEevent ([@acdenisSK]) [c:b044b6d] - [model] Correctly update the guild instance in the members chunk event ([@acdenisSK]) [c:42da202]
- [framework] Ignore empty command arguments ([@acdenisSK]) [c:b9252a5]
- [misc] Fix broken links & related doc comments ([@nickelc]) [c:83e1d12]
- [misc] Fix all clippy warnings and deprecate
Client::new([@ikkerens]) [c:ffc2997] - [examples] Send the shutdown message earlier in the sample bot example ([@tmcarr]) [c:2d365d0]
- [model] Fix
ReactionType'sDisplayimpl to support animated emojis ([@u5surf]) [c:f0a3947]
Removed
- [model] Remove unnecessary
OptionfromMessage::channel_mentions([@vicky5124]) [c:626bdfd]
-
0.9.0-rc.227 Sep 2020 pre-releaseRelease notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@bdashore3]
- [@Deebster]
- [@FelixMcFelix]
- [@ikkerens]
- [@LikeLakers2]
- [@vicky5124]
Added
- [model] Add the new 'competing in' activity type ([@vicky5124]) [c:ebc2cc7]
- [model] Add
create_webhookmethods toGuildChannel. ([@vicky5124]) [c:fb44a15] - [meta] Add cargo-make support for building the examples. ([@vicky5124]) [c:b137f51]
- [model] Add new guild features to the documentation ([@vicky5124]) [c:f2191d5]
- [model/client] Add support for invite events ([@acdenisSK]) [c:7146fd7]
Changed
- [model] Retrieve the member from HTTP if it is missing in the cache ([@acdenisSK]) [c:a3f9186]
- [framework] Call the
should_fail_commoncheck earlier ([@acdenisSK]) [c:bab4b24] - [meta] Update the MSRV to 1.40 ([@acdenisSK]) [c:3f5882c]
- [model] Use
#[non_exhaustive]where applicable ([@LikeLakers2]) [c:9ee42f1] - [meta] Switch from log to tracing. ([@vicky5124]) [c:78dd862]
- [utils] Make
parse_emojiaccept animated emojis ([@bdashore3]) [c:66e05ea] - [meta] Insert the shard manager in example 7 ([@acdenisSK]) [c:7c2d4f7]
Fixed
- [client] Fix Tungstenite IO error being discarded in ws_impl ([@ikkerens]) [c:49c1603]
- [meta] Fix feature dependencies in examples 2, 3, 4, 9, 11 ([@Deebster]) [c:9e77154]
- [framework] Temporarily fix the permissions check in the framework ([@acdenisSK]) [c:88af7cf]
- [model] Fix ReactionType not remembering animated status. ([@ikkerens]) [c:2eac499]
- [framework] Fix parsing of commands that have requirements ([@acdenisSK]) [c:323875f]
- [meta] Fix example 5's retrieval of owners when the bot belongs to a team ([@vicky5124]) [c:5c0c045]
- [framework] Fix bucket duration order ([@acdenisSK]) [c:5805539]
- [voice] Update Voice WS Sender on reconnect. ([@FelixMcFelix]) [c:659448b]
- [gateway] Fix shutdown regression ([@ikkerens]) [c:fa03b75]
Removed
- [framework] Do not emit dispatch errors when ignoring bots or webhooks ([@acdenisSK]) [c:41698b6]
-
0.9.0-rc.103 Sep 2020 pre-releaseRelease notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@AriusX7]
- [@ThatsNoMoon]
- [@bdashore3]
- [@qm3ster]
- [@nickelc]
- [@Qeenon]
- [@vicky5124]
Added
- [misc] Add latency to the general group in the 5th example ([@acdenisSK]) [c:c8dacf2]
- [model] Add
MessagesIterandmessages_iter(#942) ([@AriusX7]) [c:a7e2f74] - [model] Implement
DisplayforPermissions(#939) ([@AriusX7]) [c:1eb2714] - [model/http] Implement endpoints for getting emojis of a guild (#937) ([@acdenisSK]) [c:2a1c385]
- [client] Implement AsRef<ShardMessenger> for ShardMessenger (#936) ([@ThatsNoMoon]) [c:a9c9caa]
- [builder] Implement a builder for allowed mentions (#931) ([@vicky5124]) [c:59fb7b9]
Changed
- [framework/command_attr] Fix if condition that inspects the name of a check ([@acdenisSK]) [c:7d8c806]
- [framework] Consider
Groupchecks when displaying commands in help (#946) ([@AriusX7]) [c:f00f1c0] - [model] Remove the colon from the message generated by
Message::reply(#943) ([@Qeenon]) [c:13bf356] - [model] Remove usage of chrono in a few places and switch from FixedOffset to Utc (#935) ([@qm3ster]) [c:ed7b18e]
- [framework] Abstract CommandResult type (#934) ([@bdashore3]) [c:cfbd0be]
- [misc] Update async-tungstenite to v0.8 (#930) ([@nickelc]) [c:3d44d66]
Removed
- [misc] Remove unused dependencies ([@acdenisSK]) [c:b414f29]
-
0.9.0-rc.011 Aug 2020 pre-releaseRelease notes
Open source →Asynchronous Serenity
It has long been
.awaited for, but it's finally here! Serenity now leveragesasyncfunctions, thanks to thetokioruntime.A big thanks goes to [@Lakelezz]. Without the dedication to her efforts, it wouldn't have been possible to make the switch easily.
Release candidate
As that is a huge change, among other changes, this is actually a testing release. It is encouraged to consumers of this release to provide feedback for any warts you might encounter, be it missing features, or bugs. One important bug is the OOM bug. After a period of time has passed since the bot connected, there might be a big random spike in memory usage, prompting the OOM killer to shutdown the bot's process. It is unknown where the spike comes from, or when exactly does it occur. It doesn't happen to every bot either. If you find your bot suddenly using a lot of memory, or being killed, please let us know by opening an Issue.
Thanks to the following for their contributions:
- [@acdenisSK]
- [@asherkin]
- [@bdashore3]
- [@DimiDimit]
- [@jmgao]
- [@Lakelezz]
- [@MaxOhn]
- [@mendess]
- [@mjsir911]
- [@mysteriouspants]
- [@NieDzejkob]
- [@NilsIrl]
- [@vicky5124]
- [@Th3-M4jor]
- [@tverghis]
Added
- [model] Add
nickfield toPartialMember([@asherkin]) [c:28f9f8a] - [model] Add teams support ([@vicky5124]) [c:5a6979a]
- [model] Add
mentions_current_userhelper ([@mysteriouspants]) [c:e049bc1] - [model/client] Add the
noncefield toGuildMembersChunkand the event handler ([@mjsir911]) [c:614f99a] - [voice] Add
self_streamfield toVoiceState([@DimiDimit]) [c:c60f397] - [model] Add a method to retrieve a webhook's URL ([@vicky5124]) [c:5931d1c]
- [model] Add a method to retrieve a link to a message ([@acdenisSK]) [c:a92ca08]
- [command_attr] Add the delimiters option to the documentation ([@acdenisSK]) [c:1594a3e]
- [model] Add pagination for CurrentUser::guilds ([@NilsIrl]) [c:9eadffa]
- [model] Add methods to disconnect a member from a voice channel ([@mendess]) [c:4e8e40b]
- [model] Add
GuildId::name()([@tverghis]) [c:d99bee9]
Changed
- [misc] Update rustls dependency to 0.18 ([@acdenisSK]) [c:3dda20d]
- [all] Serenity.await ([@Lakelezz]) [c:5df4c6d]
- [misc] Address the renaming of the lavalink project ([@acdenisSK]) [c:802df92]
- [utils] Replace the in-house typemap implementation with
typemap_rev([@bdashore3]) [c:c1c7300] - [misc] Apply copyright to all people who have contributed to Serenity ([@acdenisSK]) [c:287245a]
- [model] Make
Message::replytake a content implementingstd::fmt::Display([@vicky5124]) [c:00683ef] - [framework] Expose CustomisedHelpData fields, improve help strikethrough message attributes. ([@jmgao]) [c:0d72b6e]
- [framework] Return
Option<Message>in help command functions ([@MaxOhn]) [c:4472dec] - [model] Make
Message::reactreturn itsReaction([@NieDzejkob]) [c:e7eb52d] - [model] Check the cache for an existing private channel when creating a new one ([@NieDzejkob]) [c:94d22c3]
- [framework] Replace
CommandErrorwith an alias toBox<dyn Error>([@acdenisSK]) [c:a406d48] - [misc] Mention projects that extend the functionality of the library instead ([@acdenisSK]) [c:9f75c09]
- [model] Adjust the ban methods to be consistent with the kick methods ([@acdenisSK]) [c:8628b2a]
- [http] Inject the guild id into the roles returned by the http client ([@acdenisSK]) [c:5edd11d]
- [client] Replace
&mut Contextwith&Context([@Th3-M4jor]) [c:3e4294b]
Fixed
- [model] Restrict mention parsing to be specific to the type of id ([@acdenisSK]) [c:dd580fb]
- [framework] Fix
unrecognised_command()not working if the last added group has prefixes ([@vicky5124]) [c:8040fa5] [c:760ed71] [c:21a5d8e] - [misc] Remove unnecessary feature gates and fix incorrect ones ([@acdenisSK]) [c:ed61459]
Removed
- [model] Remove
U: Into<UserId>type parameter forpartial_guild::edit_member()([@vicky5124]) [c:4227a52] - [misc] Remove Zeyla Hellyer as an author of Serenity ([@acdenisSK]) [c:9cfc410]
- [misc] Remove the matches developmental dependency ([@acdenisSK]) [c:2418edd]
- [misc] Remove usages of mem::replace where its return value is unused ([@acdenisSK]) [c:3135e0f]
-
0.8.918 Dec 2020Release notes
Open source →Thanks to the following for their contributions:
- [@Lakelezz]
- [@SadiinsoSnowfall]
Fixed
- [framework] Fix invocation by defaulting ticket limit to 1. ([@Lakelezz]) [c:eaead53]
- [framework] Fix handling sub-commands in the help-system. Adds an example command with sub-command to the command framework example as well. ([@Lakelezz]) [c:b96529e]
- [model] Fix incorrect documentation for the
MessageTooLongerror ([@SadiinsoSnowfall]) [c:bb04fad]
-
0.8.828 Nov 2020Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
Changed
- [framework] Backport changes in the framework discrepancy check from 0.9.x ([@acdenisSK]) [c:72f287c]
-
0.8.711 Aug 2020Release notes
Open source →This is a small release to publish a bunch of fixes the
currentbranch has accumulated.Thanks to the following for their contributions:
- [@7596ff]
- [@acdenisSK]
- [@dmarcoux]
- [@FelixMcFelix]
- [@fenhl]
- [@jmgao]
- [@johnchildren]
- [@ks129]
- [@s0lst1ce]
- [@SOF3]
- [@tarcieri]
- [@tweirtx]
- [@zack37]
Changed
- [misc] Use a cargo workspace to compile the examples efficiently ([@acdenisSK]) [c:6b1021f]
- [misc] Prepend 'e' to all example names ([@acdenisSK]) [c:9f848af]
- [misc] Update dependencies rustls, tungstenite, webpki-roots, parking_lot, and base64 ([@johnchildren]) [c:912d759]
- [misc] Update the Discord invite link ([@acdenisSK]) [c:1b195d7]
- [model] Support animated emojis in Emoji's Display impl ([@zack37]) [c:08d0608]
- [voice] Use the
xsalsa20poly1305crate for encryption in voice ([@tarcieri]) [c:3965e00] - [model] Consider nickname mentions in
Message::content_safe([@ks129]) [c:46db84a] - [misc] Update almost all instances of discordapp.com to discord.com ([@s0lst1ce]) [c:f98e61e]
Fixed
- [model] Fix
User::nick_inunconditionally returning if the cache is passed ([@acdenisSK]) [c:9c198ed] - [CI] Fix the Linux CI job by adding the missing system dependency ([@tweirtx]) [c:550a63c]
- [misc] Address some clippy warnings ([@dmarcoux]) [c:2a54410]
- [utils] Preserve hostname when escaping invite links ([@fenhl]) [c:7dd01eb]
- [voice] Fix
.mute(...)not preventing the bot from sending frames. ([@FelixMcFelix]) [c:638780e] - [nidek] Fix doc-link to the
Message::guild_idfield in theMessage::guildmethod ([@SOF3]) [c:84b04ba] - [framework] Fix check behaviour in the help command ([@jmgao]) [c:e000833]
- [model] Fix the documentation order of
permissions_for_roleandpermissions_for_user([@7596ff]) [c:9356a5c]
-
0.8.626 Apr 2020Release notes
Open source →This release prevents a loop when requesting a restart of a Shard, resulting in the Shard hanging forever.
Thanks to the following for their contributions:
- [@Lakelezz]
Fixed
- [gateway] Return instantly when requesting restart. ([@Lakelezz]) [c:b8e2a7d]
-
0.8.522 Apr 2020Release notes
Open source →The last bugfix release was ironically broken because of a slight oversight. This release fixes that.
Thanks to the following for their contributions:
- [@Lakelezz]
Fixed
- [gateway] Resume on Reconnect events. ([@Lakelezz]) [c:13d5481]
-
0.8.418 Apr 2020Release notes
Open source →This release fixes Serenity's handling of Discord's new rebalances. You should no longer encounter many Ready events.
Thanks to the following for their contributions:
- [@Lakelezz]
Fixed
- [gateway] Fix handling rebalances. ([@Lakelezz]) [c:003c8e1]
-
0.8.313 Apr 2020Release notes
Open source →Another bugfix release. This time it fixes a panic that would occur when using a string delimiter and messages contained a unicode character after the delimiter.
Thanks to the following for their contributions:
- [@acdenisSK]
Fixed
- [framework] Fix a panic when parsing unicode characters after a string delimiter ([@acdenisSK]) [c:7f04ecf] [c:9ebd779]
-
0.8.211 Apr 2020Release notes
Open source →This is a release for a critical bugfix.
In an attempt to fix one thing, other things broke. Any time Serenity made a request to a POST or PUT endpoint (such as creating reactions or banning users), Discord would return HTTP 400. This release corrects that.
Thanks to the following for their contributions:
- [@Lakelezz]
Fixed
- [http] Always send the
Content-Lengthheader ([@Lakelezz]) [c:f5dd8bf]
-
0.8.102 Apr 2020Release notes
Open source →This is the last release for the 0.8.x series. 0.9.x will contain async/await support!
It is mostly comprised of bugfixes and quality of life changes.
Note
While this is a minor release, a change that is technically breaking has been included. Some
MessageBuildermethods were forgotten about when changing builders to mutably borrow in 0.8.0. This release fixes that.Thanks to the following for their contributions:
- [@acdenisSK]
- [@bikeshedder]
- [@Elinvynia]
- [@KamranMackey]
- [@Lakelezz]
- [@MaxOhn]
- [@natsukagami]
- [@vicky5124]
- [@Noituri]
- [@NovusTheory]
- [@TitusEntertainment]
- [@vivianhellyer]
Added
-
[model] Add
guild_idinto theReactionmodel struct ([@Elinvynia]) [c:820d50e] -
[model] Add missing
guild_idto various events ([@NovusTheory]) [c:3ca41fd] -
[model] Add support for client statuses ([@KamranMackey]) [c:5f9a27a]
-
[http] make error module public ([@vivianhellyer]) [c:d2b19a2]
-
[builder] Reexport
Timestampfrom the builder's module. ([@acdenisSK]) [c:3a313c8] -
[model] Implement various
kick_with_reason()methods ([@vicky5124]) [c:5b0e9f3]
Changed
-
[framework] If finding the argument fails, return to the original position ([@acdenisSK]) [c:e005ef1]
-
[framework] Display groups without commands in help. ([@Lakelezz]) [c:d6b0038]
-
[model] Make
Member::distinct()show the discriminator as a 4-digit number ([@natsukagami]) [c:a23acc7] -
[http] Deserialize from slices in
fire([@Noituri]) [c:a44f16d] -
[utils] &mut self instead of mut self for MessageBuilder methods ([@MaxOhn]) [c:91f10dd]
-
[utils] Implement
Colortype alias toColour([@Elinvynia]) [c:c3d5264] -
[http] Only set the content type header if there's a body ([@acdenisSK]) [c:d851fea]
-
[framework] Store command names in lowercase when case-insensitivity is on ([@acdenisSK]) [c:8bba7b0]
Fixed
-
[misc] Fix release dates ([@bikeshedder]) [c:f27c7c1]
-
[framework/docs] Fill in the missing attribute options ([@acdenisSK]) [c:683ff27]
-
[http/docs] Fix link to the
firemethod ([@acdenisSK]) [c:1361b33] -
[framework] Fix strikethrough options refusing to accept
name = valuesyntax ([@acdenisSK]) [c:581eb2f] -
[framework/docs] Fix a broken link in docs ([@Elinvynia]) [c:48c4b59]
-
[misc] Fix a typo in the message builder example ([@TitusEntertainment]) [c:f2d0ad5]
-
[framework] Fix
check_in_helpbeing unaccounted for ([@acdenisSK]) [c:a692bcd] -
[http] Support image URLs in
add_file([@Elinvynia]) [c:61bcfbc] -
[http] Add impls for borrowed
Arcs toCacheHttp([@acdenisSK]) [c:4b67d8e]
Removed
- [all] Remove usage of deprecated
std::error::Errorfunctions ([@acdenisSK]) [c:ec306ee]
-
0.8.012 Jan 2020Release notes
Open source →The next major release of Serenity, coupled with improvements, bugfixes and some breaking changes.
group!is now#[group]To stay consistent with the
#[command],#[help]and#[check]macros, the function-likegroup!procedural macro has also joined in to the squad of the attribute procedural macros.Thanks to the following for their contributions:
- [@acdenisSK]
- [@CarlGroth]
- [@Erk-]
- [@ikkerens]
- [@Lakelezz]
- [@LeSeulArtichaut]
- [@Mendess2526]
- [@nickelc]
- [@TheUnitedStatesOfAmerica]
- [@zeyla]
Added
- [framework] Allow multiple examples in commands ([@Mendess2526]) [c:08d894e]
- [gateway] Add support for receiving custom statuses ([@Erk-]) [c:f897a8d]
Changed
- [http] Rename 'raw' module to 'client' ([@zeyla]) [c:8326dc7]
- [http] Rework ratelimit structure ([@zeyla]) [c:5dbe078]
- [cache/http] Use
CacheRwLockinCacheAndHttp([@Lakelezz]) [c:28a91c6] - [framework] Apply case-insensitivity on prefixes ([@acdenisSK]) [c:b2c951d]
- [framework] Turn off the
owner_privilegeoption ([@acdenisSK]) [c:d4b45f4] - [model] Ensure nullable Discord API values are optional in audit log fields ([@ikkerens]) [c:3a3f9b3]
- [framework] Turn the function-like group macro to an attribute macro ([@acdenisSK]) [c:5b01290]
- [http] Utilise Discord's new precision and reset-after headers ([@acdenisSK]) [c:6916bfc]
- [http] Change
AttachmentTypeto useCows instead ([@ikkerens]) [c:b5deb39] - [framework] Format the list of attribute options with tables ([@acdenisSK]) [c:3c2f9ad]
- [framework] Impose thread-safety requirements on the event handlers ([@acdenisSK]) [c:3a449ee]
- [framework] Deduplicate Client initialisation code ([@acdenisSK]) [c:e807288] [c:ab7f631]
- [client/gateway] Add an option to turn off guild subscriptions ([@acdenisSK]) [c:db5a09e]
- [framework] Interpret doc-comments as the description attribute ([@acdenisSK]) [c:cc2f918]
- [framework] Account for checks in the help command ([@acdenisSK]) [c:240d3e6]
- [framework] Add documentation to the
checkmacro ([@acdenisSK]) [c:0b3ad00] - [model] Mark the
Eventenum as untagged (serde) ([@CarlGroth]) [c:173f7fa] - [model] Add new auditlog type enums ([@ikkerens]) [c:aed4b24]
- [framework] Abuse the compiler to do type checking for us ([@acdenisSK]) [c:d6699c2]
- [meta] Upgrade to reqwest v0.10.0 ([@nickelc]) [c:69f2dff]
Fixed
- [http] Fix crash due to Bearer token not having the 'email' scope ([@LeSeulArtichaut]) [c:ae0acd0]
- [model] Fix
Guild::edit_role_positionexample ([@LeSeulArtichaut]) [c:346a7fe] - [utils] Fix compilation of the
utilsfeature without themodelfeature ([@Erk-]) [c:487fa04]
Removed
- [framework] Get rid of the
Arcimplementation forFramework([@acdenisSK]) [c:05044b6] - [client] Turn the function-like group macro to an attribute macro ([@acdenisSK]) [c:5b01290]
- [http] Remove april fools functions ([@TheUnitedStatesOfAmerica]) [c:caeeda1]
-
0.7.826 Apr 2020Release notes
Open source →This release prevents a loop when requesting a restart of a Shard, resulting in the Shard hanging forever.
Thanks to the following for their contributions:
- [@Lakelezz]
Fixed
- [gateway] Return instantly when requesting restart. ([@Lakelezz]) [c:0959f15]
-
0.7.722 Apr 2020Release notes
Open source →The last bugfix release was ironically broken because of a slight oversight. This release fixes that.
Thanks to the following for their contributions:
- [@Lakelezz]
Fixed
- [gateway] Resume on Reconnect events. ([@Lakelezz]) [c:f543b57]
-
0.7.618 Apr 2020Release notes
Open source →This release fixes Serenity's handling of Discord's new rebalances. You should no longer encounter many Ready events.
Thanks to the following for their contributions:
- [@Lakelezz]
Fixed
- [gateway] Fix handling rebalances. ([@Lakelezz]) [c:f708bec]
-
0.7.513 Jan 2020Release notes
Open source →An emergency release to fix build breakage due to violation of SemVer for the
command_attrcrate. -
0.7.413 Dec 2019Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@LeSeulArtichaut]
Added
- [framework] Enable pub restrictions ([@acdenisSK]) [c:e6ed1b5]
- [framework] Implement Default for CommandOptions and GroupOptions ([@LeSeulArtichaut]) [c:918273b]
Fixed
- [framework] Fix regression of default option initialisation ([@acdenisSK]) [c:42937e9]
-
0.7.320 Nov 2019Release notes
Open source →Small release including fixes for Discord API changes. Please note with this version the minimum supported version of Rust is 1.37.
Thanks to the following for their contributions:
- [@acdenisSK]
- [@ikkerens]
Fixed
- [framework] Properly
publicise the iterator ([@acdenisSK]) [c:1924946] - [ci] Try to update repository information beforehand ([@acdenisSK]) [c:19b590a]
- [audit log] Cover all error cases for audit log deserialization ([@ikkerens]) [c:beb4d5a] [c:afc04e4]
-
0.7.221 Oct 2019Release notes
Open source →A tiny release for a fix to voice
Thanks to the following for their contributions:
- [@acdenisSK]
- [@MOZGIII]
Fixed
- [voice] Fix
ClientVoiceManager::removeto actually callManager::remove([@MOZGIII]) [c:2734e27] - [voice] Use the correct ip for the UDP socket ([@acdenisSK]) [c:c4b1c60]
-
0.7.129 Sep 2019Nothing published for this version
-
0.7.029 Aug 2019Release notes
Open source →An emergency release to fix a conflict in our
ringdependency that prevents compilation if you pull in an older and newer version at the same time.Thanks to the following for their contributions:
- [@Lakelezz]
Changed
- [meta] Update all dependencies ([@Lakelezz]) [c:50d2a76]
-
0.6.427 Aug 2019Release notes
Open source →Thanks to the following for their contributions:
- [@Alch-Emi]
- [@AregevDev]
- [@acdenisSK]
- [@Erk-]
- [@Jerald]
- [@Lakelezz]
- [@leo-lb]
- [@Sreyas-Sreelal]
Added
- [model] Add a method to create and iterable of
Members in aGuild([@Alch-Emi]) [c:aa1070d] - [utils] Add quoting functionality to
MessageBuilder([@AregevDev]) [c:720d9ad] - [model] Add support for new message types ([@Erk-]) [c:c45c1d4]
- [model] Add support for store channel ([@Erk-]) [c:8594c29]
- [model] Link to
ShardMessenger::chunk_guildsinGuild'smemberfield ([@Alch-Emi]) [c:8e926f9] - [framework] Add group-related removal and non-consuming adding functions to
StandardFramework([@Jerald]) [c:3a4e2ed] - [framework] Allow delimiters to be set on a per command basis ([@acdenisSK]) [c:6f7797e]
- [voice] Play a YouTube Search's first video ([@Sreyas-Sreelal]) [c:ccbba0a]
- [model] Add methods to get permissions of
Roles inGuildChannels ([@Lakelezz]) [c:09c1e01] - [utils] Allow users to create their own messages ([@acdenisSK]) [c:e8da420]
Changed
- [model] Fetch the guild id only if necessary ([@acdenisSK]) [c:85dd1a0]
- [meta] Move
webpkiandwebpki-rootsto therustls_backend-feature ([@leo-lb]) [c:2439275]
Fixed
- [model] Fix content of a message if there's an attachment ([@Erk-]) [c:6d06632]
- [meta/examples] Fix a typo in the examples ([@Sreyas-Sreelal]) [c:22f3d2a]
- [framework] Fix plain help suggestions ([@Lakelezz]) [c:ec687ad]
-
0.6.324 Jul 2019Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@Erk-]
- [@hyarsan]
- [@Lakelezz]
- [@Mendess2526]
- [@NieDzejkob]
- [@xacrimon]
Added
- [cache] Implement
CacheHttpforArc<Http>([@Lakelezz]) [c:1a209e8]
Changed
- [framework] Update module-level example ([@acdenisSK]) [c:26192fa]
- [client/model/utils] Changed some
&str-parametres toimpl AsRef<str>([@xacrimon]) [c:abd84c2] - [framework] Try to always ignore bots and webhooks when configured by the user ([@acdenisSK]) [c:4cf4b21] [c:b7b3a85]
- [framework] Apply case-insensitivity to help if needed ([@acdenisSK]) [c:cd4ca1b]
Fixed
- [voice] Fix mistake in
voice::Audio's documentation withplay_only([@Mendess2526]) [c:e6c5d41] - [utils] Make
MessageBuilder::push_spoiler_*consistent with the otherpush_functions ([@hyarsan]) [c:d2df2b9] - [misc.] Update to the actual minimum Rust version Serenity supports ([@acdenisSK]) [c:d280ed1]
- [misc.] Fix comment in the group prefixes example ([@NieDzejkob]) [c:81d5af1]:
- [framework] Fix
Reason's doc-link by usingenum([@Lakelezz]) [c:a8f0387] - [client] Fix private channel deletions making serenity panic ([@Erk-]) [c:67f5e3d]
- [model] Fix
create_invite's doc-example ([@Lakelezz]) [c:45d44cb] - [framework] Update
help_commands's module example ([@acdenisSK]) [c:8cdfd7c] - [framework] Remove unnecessary ticks ([@Lakelezz]) [c:eddef7b]
-
0.6.230 Jun 2019Release notes
Open source →A small release to address a severe deserialization bug.
Thanks to the following for their contributions:
- [@benjaminrsherman]
- [@Lakelezz]
- [@zeyla]
Changed
- [meta] Reduce versioning in examples to major.minor ([@Lakelezz]) [c:13595ff]
- [framework/command_attr] Escape tags and add newline in documentation ([@Lakelezz]) [c:b28716c]
Fixed
- [framework/command_attr] Fix invalid documentation for the group macro ([@benjaminrsherman]) [c:17f1dc2]
- [model] Fix guild deserialisation regression ([@zeyla]) [c:e628614]
-
0.6.129 Jun 2019Release notes
Open source →Thanks to the following for their contributions:
- [@acdenisSK]
- [@hyarsan]
- [@Lakelezz]
- [@rsaihe]
- [@xacrimon]
- [@zeyla]