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 = {
|
||||
name: 'SIGINT',
|
||||
async execute(client) {
|
||||
execute(client) {
|
||||
client.user.setStatus('dnd');
|
||||
|
||||
console.log("\n");
|
||||
client.funcs.logger("Bot", "Closing");
|
||||
console.log("\n");
|
||||
|
||||
setTimeout(async function () {
|
||||
let message = {};
|
||||
client.funcs.saveRadios(client);
|
||||
|
||||
if (!client.stations) return process.exit();
|
||||
|
||||
await client.funcs.saveRadios(client);
|
||||
await process.exit();
|
||||
}, 5000);
|
||||
setInterval(() => {
|
||||
if(client.radio.size == 0){
|
||||
process.exit();
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user