This release adds a plethora of additions and changes (and a few bugfixes), mainly improving conformity to Discord's API. Speaking of which, special thanks goes to @HarmoGlace, who, with his hard work, generously added and improved support to features of the Discord API such as Slash Commands and other things.
Among the most important highlights of this release are:
- Full Slash Commands support.
- Support for new fields in model structures.
- Deprecation of the
region
field for theGuild
andPartialGuild
structures. The region is now set per voice channel. - HTTP Proxy support. You can now route all HTTP requests through a proxy like Twilight's HTTP proxy.
- Model type robustness. Types that designate the type/kind of a model (like a channel) will now default to the newly introduced
Unknown
variant whenever Discord adds a type/kind. This prevents runtime errors resulting from deserialisation of model types due to unrecognised types/kinds. - Better error messages for
#[command]
,#[help]
, and#[check]
functions. With a little hint, the compiler should report more detailed and accurate error messages for the return type of the functions. - Support for the "Watching..." activity.
- Better HTTP errors. Since version 8 of Discord's API, Discord provides more thorough error messages for invalid HTTP requests, and with this release, those error messages can now be displayed when printing
serenity::http::DiscordJsonError
.
Thanks to the following for their contributions:
- @acdenisSK
- @drklee3
- @HarmoGlace
- @kangalioo
- @Lakelezz
- @legendofmiracles
- @mTvare6
- @nickelc
- @nitsuga5124
- @Sei4or
- @sudomann
- @zacck
Added
- [model/gateway/client] Support command create, update, and delete events (@HarmoGlace) c:aa9748e
- [model] Support the
Team::name
field (@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
MemberUpdate
event (@nitsuga5124) c:3a6eb58 - [model] Add the
content_type
field toAttachment
(@nitsuga5124) c:1b17732 - [model] Add the invite reminder system message and flag (@nitsuga5124) c:f238a46
- [model] Add watching activity (@nitsuga5124) 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
Permissions
instead ofString
for thePartialMember::permissions
field (@HarmoGlace) c:3b662e0 - [misc] Update link to Lavalink to account for the author's name change (@mTvare6) c:7315d78
- [model] Default to the
Unknown
variant for new model types (@acdenisSK) c:cdbd14b - [misc] Introduce intradoc-links in a lot of places (@kangalioo) 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
before
for accuracy in the framework example (@sudomann) c:392a534 - [model] Update the documentation for
Message::mention_channels
with 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::errors
field 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_code
lint 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
mut
modifiers in builder code (@acdenisSK) c:9334af5