From b123ceb58498266258c035e9dd540cd86f476793 Mon Sep 17 00:00:00 2001
From: loicbersier <loic.bersier1@gmail.com>
Date: Sun, 3 May 2020 22:42:05 +0200
Subject: [PATCH] uncaughtException

---
 event/listeners/uncaughtException.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 event/listeners/uncaughtException.js

diff --git a/event/listeners/uncaughtException.js b/event/listeners/uncaughtException.js
new file mode 100644
index 00000000..7f7f1f54
--- /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