commandkit icon indicating copy to clipboard operation
commandkit copied to clipboard

[cli] fast refresh

Open twlite opened this issue 2 years ago • 4 comments

Allow reloading the changes without restarting the bot when possible

twlite avatar Dec 07 '23 12:12 twlite

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)

twlite avatar Dec 07 '23 12:12 twlite

https://www.npmjs.com/package/precinct

twlite avatar Dec 07 '23 14:12 twlite

https://www.npmjs.com/package/chokidar

NotM1Dev avatar Jan 25 '24 13:01 NotM1Dev

We need to preserve client's connection while reloading the project. Simple fs-watch won't be enough for this.

twlite avatar Jan 25 '24 13:01 twlite