diff options
author | 2021-06-29 18:37:27 +0100 | |
---|---|---|
committer | 2021-06-29 18:37:27 +0100 | |
commit | a46c61c142f865035fcd2e2cb365b0f49a420292 (patch) | |
tree | fd1f631980a3b8dc652b37f5a00c143f8db7a8e8 | |
parent | Merge pull request #1626 from python-discord/xdist (diff) | |
parent | Ensure mods cannot be watched (diff) |
Merge pull request #1660 from python-discord/don't-allow-mods-to-be-watched
Ensure mods cannot be watched
-rw-r--r-- | bot/exts/moderation/watchchannels/bigbrother.py | 5 |
1 files changed, 5 insertions, 0 deletions
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: |