Added kill module to repo.

This commit is contained in:
ThePendulum 2021-11-16 19:30:07 +01:00
parent 2c0966754b
commit a0c35bd613
1 changed files with 18 additions and 0 deletions

18
src/games/kill.js Normal file
View File

@ -0,0 +1,18 @@
const config = require('config');
function onCommand(args, context) {
context.bot.socket.transmit('message', {
roomId: context.room.id,
body: 'Shutting down... :sleeping:',
style: config.style,
});
context.logger.info(`Kill command used by ${context.user.username}`);
setTimeout(() => process.exit(), 1000);
}
module.exports = {
commands: ['kill', 'restart', 'shutdown'],
onCommand,
};