From a4d59c0c53676d5cd0a9790d3973d8a7b465887d Mon Sep 17 00:00:00 2001 From: = Date: Fri, 9 Jul 2021 18:06:11 -0400 Subject: [PATCH] Catch error on login --- index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index a86bae3..b933cf2 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,12 @@ client.once('ready', () => { // .catch(err => console.error(err)); }); -client.login(process.env.TOKEN); +client.login(process.env.TOKEN) + .then() + .catch(err => { + console.error(err); + console.log('Token: ' + process.env.TOKEN) + }; client.on('message', message => { // Get the filename and extension as an array