diff --git a/modules/LinkCop/cog.py b/modules/LinkCop/cog.py index 0ae0e97..8e89be9 100644 --- a/modules/LinkCop/cog.py +++ b/modules/LinkCop/cog.py @@ -54,10 +54,10 @@ class LinkCop(commands.Cog): if self.bot.user.id not in self.whitelisted_ID: self.whitelisted_ID.append(self.bot.user.id) - if ctx.author.id not in self.whitelisted_ID: - try: - if not any(item.id in self.whitelisted_groups for item in ctx.author.roles): - if ctx.channel.id in self.blocked_channels: + if ctx.channel.id in self.blocked_channels: + if ctx.author.id not in self.whitelisted_ID: + try: + if not any(item.id in self.whitelisted_groups for item in ctx.author.roles): if check_message(ctx.content): print('Msg with links detected in a blocked channel') @@ -67,9 +67,9 @@ class LinkCop(commands.Cog): await self.send_message(response_text) # Delete the original message await ctx.delete() - except AttributeError as err: - print(f"Link Cop Error: '{err}'") - print(f"Bot or other non-user that has not been whitelisted sent a message") + except AttributeError as err: + print(f"Link Cop Error: '{err}'") + print(f"Bot or other non-user that has not been whitelisted sent a message") async def send_message(self, message): send_channel = self.bot.get_channel(id=self.reply_channel_id)