From b174e696b2667990720b0b427eb9905a350c648f Mon Sep 17 00:00:00 2001 From: destruc7i0n Date: Wed, 5 Feb 2020 22:08:52 -0500 Subject: Precedence --- src/Discord.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Discord.ts b/src/Discord.ts index 97722c2..bc15fac 100644 --- a/src/Discord.ts +++ b/src/Discord.ts @@ -26,7 +26,8 @@ class Discord { public async init () { try { await this.client.login(this.config.DISCORD_TOKEN) - if (this.config.DISCORD_CHANNEL_NAME) this.getChannelIdFromName(this.config.DISCORD_CHANNEL_NAME) + if (this.config.DISCORD_CHANNEL_NAME && !this.config.DISCORD_CHANNEL_ID) + this.getChannelIdFromName(this.config.DISCORD_CHANNEL_NAME) } catch (e) { console.log('[ERROR] Could not authenticate with Discord: ' + e) if (this.config.DEBUG) console.error(e) -- cgit 1.4.1