Haha-Yes/event/listeners/unhandledRejection.js

16 lines
365 B
JavaScript
Raw Normal View History

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