mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 05:00:18 +00:00
Update maintenance command
This commit is contained in:
parent
930d481fcf
commit
2892913caa
@ -158,35 +158,51 @@ module.exports = {
|
|||||||
client.config.maintenanceMode = false;
|
client.config.maintenanceMode = false;
|
||||||
break;
|
break;
|
||||||
case "10":
|
case "10":
|
||||||
|
client.config.streamerMode = "manual";
|
||||||
client.config.maintenanceMode = true;
|
client.config.maintenanceMode = true;
|
||||||
|
|
||||||
client.user.setStatus('idle');
|
client.user.setStatus('idle');
|
||||||
client.funcs.saveRadios(client);
|
client.funcs.saveRadios(client);
|
||||||
|
|
||||||
client.streamer.leave(client);
|
setInterval(() => {
|
||||||
|
if(client.radio.size == 0 && client.config.streamerMode == "manual" && client.config.maintenanceMode){
|
||||||
|
client.streamer.leave(client);
|
||||||
|
client.streamer = new Streamer();
|
||||||
|
client.streamer.init(client);
|
||||||
|
|
||||||
client.config.streamerMode = "manual";
|
client.funcs.restoreRadios(client, guilds);
|
||||||
client.streamer = new Streamer();
|
client.user.setStatus('online');
|
||||||
client.streamer.init(client);
|
client.config.maintenanceMode = false;
|
||||||
|
}
|
||||||
|
|
||||||
client.funcs.restoreRadios(client, guilds);
|
if(!client.config.maintenanceMode){
|
||||||
client.user.setStatus('online');
|
clearInterval();
|
||||||
client.config.maintenanceMode = false;
|
}
|
||||||
|
}, 500);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "11":
|
case "11":
|
||||||
|
client.config.streamerMode = "auto";
|
||||||
client.config.maintenanceMode = true;
|
client.config.maintenanceMode = true;
|
||||||
|
|
||||||
client.user.setStatus('idle');
|
client.user.setStatus('idle');
|
||||||
client.funcs.saveRadios(client);
|
client.funcs.saveRadios(client);
|
||||||
|
|
||||||
client.streamer.leave(client);
|
setInterval(() => {
|
||||||
|
if(client.radio.size == 0 && client.config.streamerMode == "auto" && client.config.maintenanceMode){
|
||||||
|
client.streamer.leave(client);
|
||||||
|
client.streamer = new Streamer();
|
||||||
|
client.streamer.init(client);
|
||||||
|
|
||||||
client.config.streamerMode = "auto";
|
client.funcs.restoreRadios(client, guilds);
|
||||||
client.streamer = new Streamer();
|
client.user.setStatus('online');
|
||||||
client.streamer.init(client);
|
client.config.maintenanceMode = false;
|
||||||
|
}
|
||||||
|
|
||||||
client.funcs.restoreRadios(client, guilds);
|
if(!client.config.maintenanceMode){
|
||||||
client.user.setStatus('online');
|
clearInterval();
|
||||||
client.config.maintenanceMode = false;
|
}
|
||||||
|
}, 500);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user