diff --git a/src/utils.js b/src/utils.js index 7478193..0275337 100644 --- a/src/utils.js +++ b/src/utils.js @@ -47,17 +47,16 @@ function getMainGuilds() { */ function getLogChannel() { const inboxGuild = getInboxGuild(); - - if (! config.logChannelId) { - logChannel = inboxGuild.channels.get(inboxGuild.id); - } else if (! logChannel) { - logChannel = inboxGuild.channels.get(config.logChannelId); - } + const logChannel = inboxGuild.channels.get(config.logChannelId); if (! logChannel) { throw new BotError('Log channel not found!'); } + if (! (logChannel instanceof Eris.TextChannel)) { + throw new BotError('Make sure log channel is set to a text channel!'); + } + return logChannel; }