Moved kill comand to game module, expanded ecosystem file.

This commit is contained in:
ThePendulum 2021-11-16 19:23:51 +01:00
parent fd2bd1b8f5
commit 2c0966754b
3 changed files with 5 additions and 6 deletions

View File

@ -21,7 +21,7 @@ module.exports = {
color: 'var(--message-56)', color: 'var(--message-56)',
}, },
channels: ['GamesNight'], channels: ['GamesNight'],
games: ['mash', 'trivia', 'duck', 'ping', 'say'], games: ['mash', 'trivia', 'duck', 'ping', 'say', 'kill'],
trivia: { trivia: {
mode: 'first', // first or timeout mode: 'first', // first or timeout
rounds: 10, rounds: 10,

View File

@ -1,4 +1,8 @@
module.exports = { module.exports = {
name: 'main-clive',
script: 'src/app.js', script: 'src/app.js',
restart_delay: 5000, restart_delay: 5000,
env: {
NODE_APP_INSTANCE: null,
},
}; };

View File

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