mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-02 05:43:37 +00:00
Merge branch 'master' into fix-33
This commit is contained in:
@ -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");
|
||||
|
||||
client.funcs.saveRadios(client);
|
||||
|
||||
setTimeout(async function () {
|
||||
let message = {};
|
||||
|
||||
if (!client.stations) return process.exit();
|
||||
|
||||
await client.funcs.saveRadios(client);
|
||||
await process.exit();
|
||||
}, 5000);
|
||||
setInterval(() => {
|
||||
if(client.radio.size == 0){
|
||||
process.exit();
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
name: 'SIGTERM',
|
||||
async execute(client) {
|
||||
execute(client) {
|
||||
process.emit('SIGINT');
|
||||
}
|
||||
}
|
7
src/client/events/uncaughtException.js
Normal file
7
src/client/events/uncaughtException.js
Normal file
@ -0,0 +1,7 @@
|
||||
module.exports = {
|
||||
name: 'uncaughtException',
|
||||
execute(client, error) {
|
||||
console.log(error.stack);
|
||||
process.emit('SIGINT');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user