Skip to content

v0.9.0 - Return to Flight

Compare
Choose a tag to compare
@jb3 jb3 released this 20 Apr 22:39
· 210 commits to master since this release
v0.9.0
3d8d548

image

Welcome to Nostrum 0.9.0, code-named "Return to Flight"!

This update isn't just another runway hop; it's a potential moon mission for bot functionality. Expect smoother performance than a high-end sports car on a freshly paved racetrack, and features so innovative they'll make even the most jaded bot user do a happy dance. Alchemists, you have my assurance that with Nostrum 0.9.0, "return to flight" isn't just a codename, it's a promise of soaring possibilities.

After a 324 day hiatus since the release of Nostrum 0.8.0, the new latest release ships with new features, performance improvements and much more, all of which are broken down below.

A full changelog of the changes since v0.8.0 and v0.9.0 can be found here.

Highlights

External

  • Support for Discord Polls, documentation here
  • All channels types are now stored in the guild channels cache (not just text and voice)
  • Add NoOp implementations for the rest of the caches

Internal

  • The ratelimiter has been turned into a state machine, yielding the following
    benefits:
    • Requests are now automatically dispatched as soon as possible, and no longer
      block the ratelimiter from running other requests.
    • The client need not concern itself with retrying later anymore, the
      ratelimiter will queue them up and schedule them when it can.
    • Every response is delivered incrementally in chunks, preventing blocking the
      ratelimiter there as well.
    • If the ratelimiter's connection to the API goes down, clients are informed
      that their requests went bust via the {:error, {:connection_died, reason}}
      return.
    • Tracing the ratelimiter's inner doings is now straightforward via
      :sys.trace(Nostrum.Api.Ratelimiter, true).
  • The shard session has been turnt into a state machine, yielding the following
    benefits:
    • Instead of retrying indefinitely on connection issues, the new shard session
      will provide more direct errors on network failure.

Breaking Changes

  • Removal of the following functions, deprecated in 0.8.0:
    • GuildCache.all/0
    • GuildCache.select_by/1
    • GuildCache.select/2 along GuildCache.select!/2
  • Removal of the non-functional Nostrum.Cache.ChannelCache module (see #555 for details)
  • Removal of support for Elixir 1.13 (#544)

Deprecations

Features

  • nostrum now ships an .appup file to allow upgrading it in environments
    requiring hot code upgrade.
    • The code_change/3-4 callbacks have been introduced to support this.

Documentation & Debug

  • Check OTP version on startup and update deprecated Logger.warn/2 calls by @BrandtHill in #528
  • New icon on documentation pages (introduced in #544)
  • Fix typos in intro.md by @dawedawe in #532
  • Add missing word to state documentation by @jchristgit in #535
  • Document StateMachineTranslator as internal by @jchristgit in #541
  • Document hot code upgrades via nostrum's .appup files.
  • Document optional contribution of appup changes.
  • Remove default handle_event. use Nostrum.Consumer manages this now.
  • New propaganda added to the assets folder

Bug Fixes

Dedications

To my new cats, Benjamin and Olive, Daddy loves you
-- Craig

(Premptively) in loving memory of Jeremiah Boby
-- Johannes

To my many loving fans in the Discord API #general channel
-- Joe