Fix stop and restart commands

This commit is contained in:
Frostbide
2025-01-26 10:08:50 -08:00
parent cb4ae20300
commit 10352afaf9
2 changed files with 4 additions and 2 deletions

View File

@@ -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);
},
};

View File

@@ -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);
},
};