aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-01-19 18:39:32 +0100
committerGravatar GitHub <[email protected]>2019-01-19 18:39:32 +0100
commit5f0a7a738de6a1a38600ccac730df0749d4c7dad (patch)
tree50c61104ca112a3b5aa6361b03f73554ef5ab6ad
parentMerge pull request #253 from FrenchMasterSword/master (diff)
parentHiding 'hidden infractions' from regular users user information embed (diff)
Merge pull request #286 from python-discord/user-command-hidden-infractions
Hiding 'hidden infractions' from regular users user information embed
-rw-r--r--bot/cogs/information.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/cogs/information.py b/bot/cogs/information.py
index 129166d2f..0d31cb0d3 100644
--- a/bot/cogs/information.py
+++ b/bot/cogs/information.py
@@ -135,10 +135,13 @@ class Information:
if not with_role_check(ctx, *MODERATION_ROLES):
raise BadArgument("You do not have permission to use this command on users other than yourself.")
- # Non-moderators may only do this in #bot-commands
+ # Non-moderators may only do this in #bot-commands and can't see
+ # hidden infractions.
if not with_role_check(ctx, *MODERATION_ROLES):
if not ctx.channel.id == Channels.bot:
raise MissingPermissions("You can't do that here!")
+ # Hide hidden infractions for users without a moderation role
+ hidden = False
# Validates hidden input
hidden = str(hidden)