mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2024-11-10 02:20:18 +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");
|
||||||
|
|
||||||
setTimeout(async function () {
|
client.funcs.saveRadios(client);
|
||||||
let message = {};
|
|
||||||
|
|
||||||
if (!client.stations) return process.exit();
|
setInterval(() => {
|
||||||
|
if(client.radio.size == 0){
|
||||||
await client.funcs.saveRadios(client);
|
process.exit();
|
||||||
await process.exit();
|
}
|
||||||
}, 5000);
|
}, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user