You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Haha-Yes/event/listeners/unhandledRejection.js

17 lines
398 B
JavaScript

const { Listener } = require('discord-akairo');
class unhandledRejectionListener extends Listener {
constructor() {
super('unhandledRejection', {
emitter: 'process',
event: 'unhandledRejection'
});
}
async exec(error, reason) {
console.error(reason);
return console.error(`\x1b[31mUncaught Promise Rejection: ${error}\x1b[37m`);
}
}
module.exports = unhandledRejectionListener;