♻️ Update & migrations
Global update guide
TSCord is a template-kind of project, so updating it can really be harsh.
However, here is an update guide that you can follow for each migration:
cd
into your project directorygit remote add tscord https://github.com/barthofu/tscord
git fetch origin
- Now, get the tag of the release you want to update to (ex:
v2.1
) git merge v2.1
(replacev2.1
with the tag you want to)- Resolve the conflicts (we highly recommend you to use the new merge editor of VSCode)
- Once you've resolved all the conflict, commit the changes
git remote rm tscord
Migrations
v2.0 to v2.1
Custom events
Events and Custom events, which used to both relay the @On()
decorator of discordx
, are now split.
Indeed, we've implemented our own event manager so custom events are split from the discord ones, so they don't have to execute the whole guards pipeline.
You'll have to replace all your custom events by the new @OnCustom()
decorators, and emit them via the emit()
method of the EventManager
service.
configs
alias
The src/config
folder has been renamed to src/configs
, and so for its path alias: @config
-> @configs