From a265e3197b9033a8965413b0811b8b6b0b493b47 Mon Sep 17 00:00:00 2001 From: Will Hunt <half-shot@molrams.com> Date: Tue, 25 Jul 2017 22:32:32 +0100 Subject: [PATCH] Throw on login failure for bot user --- src/clientfactory.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clientfactory.ts b/src/clientfactory.ts index 3e27090..ec842ec 100644 --- a/src/clientfactory.ts +++ b/src/clientfactory.ts @@ -33,6 +33,7 @@ export class DiscordClientFactory { .timeout(READY_TIMEOUT, "Bot timed out waiting for ready.") .catch((err) => { log.error("ClientFactory", "Could not login as the bot user. This is bad!", err); + throw err; }); } @@ -50,7 +51,7 @@ export class DiscordClientFactory { resolve(id); }); }).timeout(READY_TIMEOUT).catch((err: Error) => { - log.warn("ClientFactory", "Could not login as the bot user '%s'", err.message); + log.warn("ClientFactory", "Could not login as a normal user. '%s'", err.message); throw Error("Could not retrive ID"); }); } -- GitLab