From 5498d7f685820bcc26d48a9f990114d705daec80 Mon Sep 17 00:00:00 2001 From: Adam Davies Date: Sun, 26 Jul 2020 00:54:47 -0500 Subject: [PATCH] Improve startup logging --- lib/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index e76a943..c0892bd 100644 --- a/lib/index.js +++ b/lib/index.js @@ -20,10 +20,12 @@ let settings = settingsUtil.DEFAULT_SETTINGS; // Start bot // ========================= -bot.login(process.env.BOT_TOKEN); +bot.login(process.env.BOT_TOKEN) + .then(() => console.log(`${bot.user.username} logged in`)) + .catch(err => console.error(err)); bot.on('ready', async () => { - console.log(bot.user.username + ' successfully started'); + console.log(`${bot.user.username} successfully started`); bot.user.setPresence({ activity: { type: 'WATCHING', name: `for ${C_DEALS}` }});