Simplify events

This commit is contained in:
Christer Warén
2023-06-06 03:41:04 +03:00
parent 348ac90cba
commit 87cf4b62c8
10 changed files with 232 additions and 257 deletions

View File

@ -1,13 +1,10 @@
import RadioClient from "../../Client";
export default {
name: 'uncaughtException',
execute(client: RadioClient, error: any) {
client.funcs.logger("Error");
console.log(error.stack);
console.log('');
export default function uncaughtException(client: RadioClient, error: Error) {
client.funcs.logger("Error");
console.log(error.stack);
console.log('');
if(error.name == "DiscordAPIError" && error.message == "Unknown interaction") return;
process.emit('SIGINT');
}
if(error.name == "DiscordAPIError" && error.message == "Unknown interaction") return;
process.emit('SIGINT');
}