mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-12-22 20:23:16 +00:00
Updated SIGINT event
This commit is contained in:
parent
884233a938
commit
4edfe6848c
@ -1,23 +1,18 @@
|
|||||||
const { REST } = require('@discordjs/rest');
|
|
||||||
const { Routes } = require('discord-api-types/v9');
|
|
||||||
const { token, version } = require('../../config.js');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'SIGINT',
|
name: 'SIGINT',
|
||||||
async execute(client) {
|
execute(client) {
|
||||||
client.user.setStatus('dnd');
|
client.user.setStatus('dnd');
|
||||||
|
|
||||||
console.log("\n");
|
console.log("\n");
|
||||||
client.funcs.logger("Bot", "Closing");
|
client.funcs.logger("Bot", "Closing");
|
||||||
console.log("\n");
|
console.log("\n");
|
||||||
|
|
||||||
|
client.funcs.saveRadios(client);
|
||||||
|
|
||||||
setTimeout(async function () {
|
setInterval(() => {
|
||||||
let message = {};
|
if(client.radio.size == 0){
|
||||||
|
process.exit();
|
||||||
if (!client.stations) return process.exit();
|
}
|
||||||
|
}, 500);
|
||||||
await client.funcs.saveRadios(client);
|
|
||||||
await process.exit();
|
|
||||||
}, 5000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user