Skip to content

Commit

Permalink
Precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
destruc7i0n committed Feb 6, 2020
1 parent 4d08955 commit b174e69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b174e69

Please sign in to comment.