Join our discord!
Wow! We’re finally increasing our semantic versioning by +1.7.9.
What does this mean?
Plugin Support for Event Modules
You can now use plugins for event modules. Previous version would throw an error if the
plugins field was populated.
Applying this plugin to some eventModule:
Dependency Injection and Decoupling
The powerful npm package iti decouples sern even more.
Decoupling data structures with the Inversion of Control pattern separates data from logic, which will help speed production
and make sern even more customizable than before.
How do I start?
Using the Sern#makeDependencies function, inject your dependencies.
We’ll use specific dependencies that are created with the @sern/keyword
key.
Using typescript to display all keywords and what they represent:
At the moment, one optional dependency, @sern/logger, exists. If not added explicitly,
we’ll autofill with a DefaultLogger.
Use your generated dependency getter useContainer (use whatever name you want), access them
from anywhere.
2.0 includes all the new role select menus. CommandType.MenuSelect has been renamed into
CommandType.StringSelect. The remaining SelectMenus are
CommandType.RoleSelect, CommandType.ChannelSelect, CommandType.UserSelect, CommandType.MentionableSelect
In addition, commandModules with ContextMenus have been renamed.
Typings Simplification
Pre 2.0:
Post 2.0:
CommandPlugin<T> and EventPlugin<T> typings have also been static’ified, transformed from types to interfaces
Breaking Changes
All deprecation warnings from previous versions have taken effect, and are removed in 2.0.
Override type has been removed due to redundancy
Including the previous section, some names to symbols and data structures were altered to
be better represented. view changelog
Context refactoring
The context data structure has been internally altered to represent its dynamics better.