Fix stop and restart commands
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
const chalk = require('chalk');
|
||||
module.exports = {
|
||||
names: ['restart', 'reboot'],
|
||||
run(context) {
|
||||
const { bot } = context;
|
||||
bot.logger.log(chalk.red('Restarting bot!'));
|
||||
bot._client.destroy();
|
||||
bot.client.destroy();
|
||||
process.exit(1);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
const chalk = require('chalk');
|
||||
module.exports = {
|
||||
names: ['end', 'stop', 'quit'],
|
||||
run(context) {
|
||||
const { bot } = context;
|
||||
bot.logger.log(chalk.red('Ending bot!'));
|
||||
bot._client.destroy();
|
||||
bot.client.destroy();
|
||||
process.exit(0);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user