From d0305fcd409a070c80fe8649e709d30c55e3b4c9 Mon Sep 17 00:00:00 2001 From: TheKrol Date: Fri, 19 Apr 2024 16:25:29 -0400 Subject: [PATCH] Hopefully fix a bug with warns --- techsupport_bot/commands/protect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/techsupport_bot/commands/protect.py b/techsupport_bot/commands/protect.py index f94aa0b7e..b06c0c081 100644 --- a/techsupport_bot/commands/protect.py +++ b/techsupport_bot/commands/protect.py @@ -415,7 +415,7 @@ async def handle_warn(self, ctx, user: discord.Member, reason: str, bypass=False # Attempt DM for manually initiated, non-banning warns if ctx.command == self.bot.get_command("warn"): # Cancel warns in channels invisible to user - if user not in ctx.channel.members: + if not ctx.channel.permissions_for(user).view_channel: await auxiliary.send_deny_embed( message=f"{user} cannot see this warning.", channel=ctx.channel )