Finishing touches to admin commands

This commit is contained in:
Christopher Cookman 2025-01-25 09:33:51 -07:00
parent db3cff0aa0
commit 373b6e1926

View file

@ -52,6 +52,15 @@ module.exports.execute = async (interaction) => {
}); });
break; break;
case 'reboot': // Run `reboot 0` 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) => { runCommand('reboot 0').then((res) => {
interaction.reply({ content: "Rebooting...", ephemeral: true }); interaction.reply({ content: "Rebooting...", ephemeral: true });
}); });