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