Skip to content

Commit

Permalink
release: 2023-04-27 (twilight-rs#2200)
Browse files Browse the repository at this point in the history
* release: 2023-04-27

* s/nulls/removes

Co-authored-by: Jens Reidel <adrian@travitia.xyz>

* simd-json version range bump

* consistent section capitalization

* mention dependency update in introductory sentence

* s/accepted/allowed & line wrap

* s/increased/broadened

---------

Co-authored-by: Jens Reidel <adrian@travitia.xyz>
  • Loading branch information
vilgotf and Gelbpunkt authored Apr 27, 2023
1 parent 595187f commit b59889f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,49 @@
# 2023-03-28 Updates
# 2023-04-27 Updates

We've published minor versions of a number of crates. This release is composed
of bugfixes, performance improvements, and documentation improvements.
of bugfixes, new features, performance improvements, documentation improvements,
and dependency updates.

## Bugfixes

Discord's Clyde AI bot has a unique avatar hash. Unlike other hashes that are
hex based, Clyde's avatar hash is simply "clyde". We now handle deserialization
of Clyde's avatar in our [`ImageHash`] optimization.

Application command interaction options of type `String` are no longer trimmed
of leading zeroes.

The [`UpdateCurrentMember`] request now correctly removes the current member's
nickname if passed `None`.

The [gateway queue]'s [`DayLimiter`] now properly calculates when the session
resets.

The [`UpdateGuildSticker`] request now uses the specified audit log reason;
prior, it was accidentally ignoring the reason.

Discord's Clyde AI bot has a unique avatar hash. Unlike other hashes that are
hex based, Clyde's avatar hash is simply "clyde". We now handle deserialization
of Clyde's avatar in our [`ImageHash`] optimization.
## Dependency Updates

The allowed version range of `simd-json` was broadened to `>=0.4, <0.10` in
twilight-gateway and twilight-http.

## Documentation Improvements

[`Standby`] now has an example of how to timeout futures and streams.

The [`Event::IntegrationDelete`] and [`Event::IntegrationUpdate`] variants'
documentation was inversed, and has now been corrected.

[`Standby`] now has an example of how to timeout futures and streams.
## Feature Additions

The [`AutoModerationTriggerMetadata`] struct now supports the
`mention_total_limit` and `regex_patterns` fields.

The guild [`Permissions`] bitflag now supports the
`VIEW_CREATOR_MONETIZATION_ANALYTICS` and `USE_SOUNDBOARD` variants and renames
`MANAGE_EMOJIS_AND_STICKERS` to `MANAGE_GUILD_EXPRESSIONS`.

The [`Interaction`] struct now supports the `channel` field.

## Performance Improvements

Expand All @@ -32,21 +55,25 @@ Impressive!

Avatars, banners, icons, and other assets are received as hashes, which we have
[`ImageHash`] for as a performance improvement in storage. Instead of storing
hashes as heap-allocated strings, we store them as 16 bytes on the stack.
The performance of the deserialization and parsing of hashes is now 38% faster.
hashes as heap-allocated strings, we store them as 16 bytes on the stack. The
performance of the deserialization and parsing of hashes is now 38% faster.

Caching users received in [`InteractionCreate`] events is now a bit faster in
some situations due to [keying into a HashMap][`HashMap::get`] to check for the
existence of a user instead of [iterating over the HashMap][`HashMap::iter`].

[`AutoModerationTriggerMetadata`]: https://docs.rs/twilight-model/0.15.2/twilight_model/guild/auto_moderation/struct.AutoModerationTriggerMetadata.html
[`CommandRatelimiter`]: https://docs.rs/twilight-gateway/0.15.2/twilight_gateway/struct.CommandRatelimiter.html
[`DayLimiter`]: https://docs.rs/twilight-gateway-queue/0.15.2/twilight_gateway_queue/struct.LocalQueue.html
[`Event::IntegrationDelete`]: https://docs.rs/twilight-model/0.15.2/twilight_model/gateway/event/enum.Event.html#variant.IntegrationDelete
[`Event::IntegrationUpdate`]: https://docs.rs/twilight-model/0.15.2/twilight_model/gateway/event/enum.Event.html#variant.IntegrationUpdate
[`HashMap::get`]: https://doc.rust-lang.org/stable/std/collections/hash_map/struct.HashMap.html#method.get
[`HashMap::iter`]: https://doc.rust-lang.org/stable/std/collections/hash_map/struct.HashMap.html#method.iter
[`ImageHash`]: https://docs.rs/twilight-model/0.15.2/twilight_model/util/image_hash/struct.ImageHash.html
[`Interaction`]: https://docs.rs/twilight-model/0.15.2/twilight_model/application/interaction/struct.Interaction.html
[`InteractionCreate`]: https://docs.rs/twilight-model/0.15.2/twilight_model/gateway/payload/incoming/struct.InteractionCreate.html
[`Permissions`]: https://docs.rs/twilight-model/0.15.2/twilight_model/guild/struct.Permissions.html
[`Standby`]: https://docs.rs/twilight-standby/0.15.2/twilight_standby/struct.Standby.html
[`UpdateCurrentMember`]: https://docs.rs/twilight-http/0.15.2/twilight_http/request/guild/struct.UpdateCurrentMember.html
[`UpdateGuildSticker`]: https://docs.rs/twilight-http/0.15.2/twilight_http/request/guild/sticker/struct.UpdateGuildSticker.html
[gateway queue]: https://docs.rs/twilight-gateway-queue/0.15.2/twilight_gateway_queue/index.html
2 changes: 1 addition & 1 deletion book/src/versions/summary.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Version History

- [0.15 - 2023-02-05](./0.15/summary.md)
- [0.15.2 - 2023-03-28](./0.15/2023-03-28.md)
- [0.15.2 - 2023-04-27](./0.15/2023-04-27.md)
- [0.15.1 - 2023-02-26](./0.15/2023-02-26.md)

0 comments on commit b59889f

Please sign in to comment.