schat2-clive/src/games/kill.js

19 lines
402 B
JavaScript
Raw Normal View History

2021-11-16 18:30:07 +00:00
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,
};