diff --git a/src/commands/console/restart.js b/src/commands/console/restart.js index fdadcb2..917fa55 100644 --- a/src/commands/console/restart.js +++ b/src/commands/console/restart.js @@ -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); }, }; diff --git a/src/commands/console/stop.js b/src/commands/console/stop.js index 5cd1daa..b5ea9f6 100644 --- a/src/commands/console/stop.js +++ b/src/commands/console/stop.js @@ -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); }, };