diff --git a/event/listeners/uncaughtException.js b/event/listeners/uncaughtException.js new file mode 100644 index 0000000..7f7f1f5 --- /dev/null +++ b/event/listeners/uncaughtException.js @@ -0,0 +1,16 @@ +const { Listener } = require('discord-akairo'); + +class unhandledRejectionListener extends Listener { + constructor() { + super('uncaughtException', { + emitter: 'process', + event: 'uncaughtException' + }); + } + + async exec(error) { + return console.error(`\x1b[31mUncaughtException: ${error}\x1b[37m`); + } +} + +module.exports = unhandledRejectionListener; \ No newline at end of file