commandkit
commandkit copied to clipboard
[cli] fast refresh
Allow reloading the changes without restarting the bot when possible
How to make this happen?
- we keep track of what files are modified, if files inside validations/commands/events are changed, we can simply invoke reload method of commandkit
- if main file is changed, we definitely need to restart the process from scratch
- if any of the files imported by main file gets updated, we need to trigger restart (need to keep track of imports for this somehow)
https://www.npmjs.com/package/precinct
https://www.npmjs.com/package/chokidar
We need to preserve client's connection while reloading the project. Simple fs-watch won't be enough for this.