Closed sleepymanakete closed 5 years ago
Yeah, that used to happen a lot, but Mikka fixed that issue a while ago, on September 20th or somewhere around there. Do you have the most current version of the bot?
yup, i have the lastest version
Hmm. I don't know then. Are you familiar with pm2? I literally just figured it out maybe half an hour ago. It would make it so that if it crashes like that again, or if your internet goes offline and comes back up, it'll automatically restart the bot for you. I just got it working, tested it twice, and it's great so far.
Can you please explain what pm2 is?
PM2 is a process manager which, among other things, can auto-restart the bot for you if it crashes. Ideally the bot wouldn't crash at all, of course, but pm2 helps when it does.
For modmail, to use pm2 (after installing it), you would basically just replace step 7 in Setup with the command pm2 start --name modmail npm -- start
and then, if you need to restart the bot later (e.g. after updating it), you'd run pm2 restart modmail
.
ahh, thank you!!
My bot goes offline randomly and I have to start it up again. Message I get in cmd: