diff --git a/src/main.js b/src/main.js index fa7fd64..99f2a19 100755 --- a/src/main.js +++ b/src/main.js @@ -17,9 +17,10 @@ global.dClient = new Discord.Client({ disableEveryone: true }); } catch(e) {} } process.on('unhandledRejection', error => onError(error, "Unhandled Rejection")); - process.on('uncaughtException', error => onError(error, "Uncaught Exception")); + exitHook.uncaughtExceptionHandler(error => onError(error, "Uncaught Exception")); dClient.on('error', error => onError(error, "Discord Client Error")); dClient.on('warn', error => onError(error, "Discord Client Warning")); + }