mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 04:20:19 +00:00
Updated SIGINT event
This commit is contained in:
parent
74239f71a7
commit
65f83bc522
@ -11,15 +11,13 @@ module.exports = {
|
|||||||
|
|
||||||
let currentRadios = client.radio.keys();
|
let currentRadios = client.radio.keys();
|
||||||
let radio = currentRadios.next();
|
let radio = currentRadios.next();
|
||||||
let stoppedRadios = "";
|
|
||||||
client.user.setStatus('idle');
|
|
||||||
|
|
||||||
while (!radio.done) {
|
while (!radio.done) {
|
||||||
let currentRadio = await client.radio.get(radio.value);
|
let currentRadio = client.radio.get(radio.value);
|
||||||
currentRadio.guild = await client.datastore.getEntry(radio.value).guild;
|
currentRadio.guild = client.datastore.getEntry(radio.value).guild;
|
||||||
|
|
||||||
if (currentRadio) {
|
if (currentRadio) {
|
||||||
await client.funcs.statisticsUpdate(client, currentRadio.guild, currentRadio);
|
client.funcs.statisticsUpdate(client, currentRadio.guild, currentRadio);
|
||||||
currentRadio.connection?.destroy();
|
currentRadio.connection?.destroy();
|
||||||
currentRadio.audioPlayer?.stop();
|
currentRadio.audioPlayer?.stop();
|
||||||
currentRadio.message?.delete();
|
currentRadio.message?.delete();
|
||||||
@ -33,7 +31,7 @@ module.exports = {
|
|||||||
client.radio.delete(radio.value);
|
client.radio.delete(radio.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
radio = await currentRadios.next();
|
radio = currentRadios.next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -44,9 +42,11 @@ module.exports = {
|
|||||||
|
|
||||||
client.user.setStatus('dnd');
|
client.user.setStatus('dnd');
|
||||||
|
|
||||||
setTimeout(function () {
|
setInterval(() => {
|
||||||
|
if(radio.done){
|
||||||
process.exit();
|
process.exit();
|
||||||
}, 5000);
|
}
|
||||||
|
}, 1000);
|
||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user