From fc30c540d62ae2d0a04c3f33313a3d2744c3fa94 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Tue, 29 Jun 2021 18:26:03 +0100 Subject: Ensure mods cannot be watched This meant admins could also be watched, meaning their messages in ancy channel would be relayed to the BB channel. --- bot/exts/moderation/watchchannels/bigbrother.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bot/exts/moderation/watchchannels/bigbrother.py b/bot/exts/moderation/watchchannels/bigbrother.py index 3b44056d3..c6ee844ef 100644 --- a/bot/exts/moderation/watchchannels/bigbrother.py +++ b/bot/exts/moderation/watchchannels/bigbrother.py @@ -94,6 +94,11 @@ class BigBrother(WatchChannel, Cog, name="Big Brother"): await ctx.send(f":x: {user} is already being watched.") return + # FetchedUser instances don't have a roles attribute + if hasattr(user, "roles") and any(role.id in MODERATION_ROLES for role in user.roles): + await ctx.send(f":x: I'm sorry {ctx.author}, I'm afraid I can't do that. I must be kind to my masters.") + return + response = await post_infraction(ctx, user, 'watch', reason, hidden=True, active=True) if response is not None: -- cgit v1.2.3