From d410a4efb5b9756728c8c5e7494aade80d2d8e24 Mon Sep 17 00:00:00 2001 From: dragonfire535 Date: Sun, 12 Mar 2017 10:35:38 -0400 Subject: [PATCH] Catch all Promise Rejections --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 531c4954..45ea5f07 100644 --- a/index.js +++ b/index.js @@ -190,4 +190,8 @@ client.once('ready', () => { client.user.setGame(";help | dragonfire535"); }); +process.on('unhandledRejection', function(reason, p){ + console.log("Possibly Unhandled Rejection at: Promise ", p, " reason: ", reason); +}); + client.login(config.token); \ No newline at end of file