Closed Blatoy closed 5 years ago
Feel free to do a PR for it!
The basic idea would be to move the install.sh script over to node.js (so it runs on Windows as well). Either as a new pre-install script, or when you first launch the bot/index.js
file.
In the end, the following files have to be present:
bot.json
dashboard.js
with the prompted values pre-filled (and possibly validated similarly).
The folder used to be hardcoded to a default path /instance/
, but it'd be very nice to use the value of --config-path
instead (stored in global.discotronConfigPath
after parsing args).
To detect on startup if installation needs to be run, we also created a file .installed
, but in hindsight, a better solution is to simply check if both config files exist!
@RedMser is it ok to use readline-sync
package to read input from the console?
is it ok to use
readline-sync
package to read input from the console?
The package is pretty lightweight (no dependencies), and reading from console is a nightmare with plain node.js, so using that package is no problem at all! :+1:
Hii, I would like to work on this!