diff options
author | 2021-06-29 21:47:24 +0100 | |
---|---|---|
committer | 2021-06-29 21:47:24 +0100 | |
commit | c2594268099dabd67b6d01a9bcd4eccd551e519f (patch) | |
tree | f9e386c80febd8504ed16a7e1db9ed490d956579 | |
parent | upgrade pytest-xdist (diff) | |
parent | Merge pull request #1660 from python-discord/don't-allow-mods-to-be-watched (diff) |
Merge branch 'main' into move-cov-config-to-toml
-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: |