From 10352afaf908573fcc692f72303d7cd56ca5018a Mon Sep 17 00:00:00 2001 From: Frostbide <129122542+Frostbide@users.noreply.github.com> Date: Sun, 26 Jan 2025 10:08:50 -0800 Subject: [PATCH] Fix stop and restart commands --- src/commands/console/restart.js | 3 ++- src/commands/console/stop.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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); }, };