v0.9.0 - Return to Flight
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)
.
- Requests are now automatically dispatched as soon as possible, and no longer
- 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.
- Instead of retrying indefinitely on connection issues, the new shard session
Breaking Changes
- Removal of the following functions, deprecated in 0.8.0:
GuildCache.all/0
GuildCache.select_by/1
GuildCache.select/2
alongGuildCache.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
- No longer crash if Discord leaks a struct to us over the ETF gateway, by @Th3-M4jor in #512
- Reconnect requests fixed by @Th3-M4jor in #510
Util.get_all_shard_latencies
is fixed by @Th3-M4jor in #507
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