Added kill command and PM2 ecosystem file with restart delay.

This commit is contained in:
2021-11-16 19:10:58 +01:00
parent 701cf82af8
commit f455635e0a
2 changed files with 9 additions and 0 deletions

View File

@@ -145,6 +145,11 @@ function onMessage(message, bot, games) {
const user = bot.users[message.userId] || message.user;
const room = bot.rooms[message.roomId];
if (command === 'kill') {
process.exit();
return;
}
if (command) {
const args = body.split(/\s+/).slice(1);
const game = games[command];