How to restart after bot crashes

I know is not JS related, but maybe is still one of the best places to ask. Sometimes user input error out. Im using ubuntu and nodemon the bot file. Anyone knows how to reboot automatically?
19 Replies
d.js docs
d.js docs•3y ago
Manage your application state with pm2 so you can restart, stop and delete processes dynamically: learn more
Jaworek
Jaworek•3y ago
^
Mulo
MuloOP•3y ago
im using nodemon tho, is there another way?
Jaworek
Jaworek•3y ago
its pm2
Ashu
Ashu•3y ago
Hey, I got the kinda same question, check my latest post.
monbrey
monbrey•3y ago
Same shit. Just process.exit() and let the monitoring thing reboot it
Ashu
Ashu•3y ago
I tried process.exit() on linux, it doesn't kill the child processes
monbrey
monbrey•3y ago
yeah this question isnt about sharding though
Ashu
Ashu•3y ago
ya, can you help me in my latest post? #How to exit all shards and main process?
monbrey
monbrey•3y ago
Nope, I dont shard
Ashu
Ashu•3y ago
oh okay
monbrey
monbrey•3y ago
Please dont advertise your question in other peoples posts
Ashu
Ashu•3y ago
okay
monbrey
monbrey•3y ago
Not to mention you already opened two of them 👀
Ashu
Ashu•3y ago
ya they are 2 different things
Jaworek
Jaworek•3y ago
no don't do it
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Jaworek
Jaworek•3y ago
bc its bad practice
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server