Closed SirTLB closed 1 year ago
@kaimen-sano I'd say we change the .catch() in main to: main().catch(e => {console.log(e), process.exit()})
Yep, but we should be specifying a non-zero exit code to indicate that an error occurred.
main().catch((e) => {
console.error(e);
process.exit(1);
});
would be a good starting point for something appropriate to do.
Ok. PR is up
Improvement description
Have the bot log on exit. For now, the bot just calls process.exit on a error so the bot exists. To see the error that actually occurred and made the bot exit, make sure it also logs the obtained error and then exits using process.exit.