Update maintenance command

This commit is contained in:
Christer Warén 2021-09-14 17:12:47 +03:00
parent 930d481fcf
commit 2892913caa

View File

@ -158,35 +158,51 @@ module.exports = {
client.config.maintenanceMode = false;
break;
case "10":
client.config.streamerMode = "manual";
client.config.maintenanceMode = true;
client.user.setStatus('idle');
client.funcs.saveRadios(client);
setInterval(() => {
if(client.radio.size == 0 && client.config.streamerMode == "manual" && client.config.maintenanceMode){
client.streamer.leave(client);
client.config.streamerMode = "manual";
client.streamer = new Streamer();
client.streamer.init(client);
client.funcs.restoreRadios(client, guilds);
client.user.setStatus('online');
client.config.maintenanceMode = false;
}
if(!client.config.maintenanceMode){
clearInterval();
}
}, 500);
break;
case "11":
client.config.streamerMode = "auto";
client.config.maintenanceMode = true;
client.user.setStatus('idle');
client.funcs.saveRadios(client);
setInterval(() => {
if(client.radio.size == 0 && client.config.streamerMode == "auto" && client.config.maintenanceMode){
client.streamer.leave(client);
client.config.streamerMode = "auto";
client.streamer = new Streamer();
client.streamer.init(client);
client.funcs.restoreRadios(client, guilds);
client.user.setStatus('online');
client.config.maintenanceMode = false;
}
if(!client.config.maintenanceMode){
clearInterval();
}
}, 500);
break;
default: