Skip to content

Commit

Permalink
refactor(discord: commands): add reboot command, not feature cuz poss…
Browse files Browse the repository at this point in the history
…ible b4
  • Loading branch information
dsevillamartin committed Oct 11, 2017
1 parent c372011 commit 8f83906
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions lib/Discord/Commands/Reboot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const Command = require('../Command');

class RebootCommand extends Command {
constructor(bot) {
super(bot);
this.props.help = {
name: 'reboot',
description: 'reboot bot',
usage: 'ping',
};
}
run(msg) {
return msg.channel.send({
embed: {
color: 0x2ECC71,
title: 'Updating',
description: 'Restarting...',
},
})
.then(() => {
Log.info('RESTARTING - Executed `reboot` command');
process.exit();
});
}
}

module.exports = RebootCommand;

0 comments on commit 8f83906

Please sign in to comment.