schat2-clive/src/games/kill.js

22 lines
472 B
JavaScript

const config = require('config');
function onCommand(args, context) {
console.log(context);
context.bot.socket.transmit('message', {
roomId: context.room?.id,
recipient: context.message.user?.username,
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,
};