Update maintenance command

This commit is contained in:
Christer Warén 2021-09-10 03:17:22 +03:00
parent a5eec44b8e
commit 0b8fb4977c

View File

@ -93,23 +93,30 @@ module.exports = {
switch(action){ switch(action){
case "0": case "0":
client.config.maintenance = true;
process.emit('SIGINT'); process.emit('SIGINT');
break; break;
case "4": case "4":
client.config.maintenance = true;
client.user.setStatus('idle'); client.user.setStatus('idle');
client.funcs.saveRadios(client); client.funcs.saveRadios(client);
client.user.setStatus('online'); client.user.setStatus('online');
client.config.maintenance = false;
break; break;
case "5": case "5":
client.config.maintenance = true;
client.user.setStatus('idle'); client.user.setStatus('idle');
let guilds = await client.guilds.fetch(); let guilds = await client.guilds.fetch();
client.funcs.restoreRadios(client, guilds); client.funcs.restoreRadios(client, guilds);
client.user.setStatus('online'); client.user.setStatus('online');
client.config.maintenance = false;
break; break;
case "6": case "6":
client.config.maintenance = true;
client.user.setStatus('idle'); client.user.setStatus('idle');
require(`../commands.js`).execute(client); require(`../commands.js`).execute(client);
client.user.setStatus('online'); client.user.setStatus('online');
client.config.maintenance = false;
break; break;
case "7": case "7":
try { try {