Finishing touches to admin commands
This commit is contained in:
parent
db3cff0aa0
commit
373b6e1926
|
@ -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 });
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue