From 373b6e1926682859bd6c3a13d4fd31bb518f1de4 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sat, 25 Jan 2025 09:33:51 -0700 Subject: [PATCH] Finishing touches to admin commands --- interactionHandlers/commands/admin.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/interactionHandlers/commands/admin.js b/interactionHandlers/commands/admin.js index bad63fd..ef9e668 100644 --- a/interactionHandlers/commands/admin.js +++ b/interactionHandlers/commands/admin.js @@ -52,6 +52,15 @@ module.exports.execute = async (interaction) => { }); break; case 'reboot': // Run `reboot 0` + await client.destroy(); + log.info('Client destroyed.'); + pool.end((err) => { + if (err) { + log.error('Error closing database pool:', err); + } else { + log.info('Database pool closed.'); + } + }); runCommand('reboot 0').then((res) => { interaction.reply({ content: "Rebooting...", ephemeral: true }); });