diff options
author | 2019-10-21 18:45:25 +0200 | |
---|---|---|
committer | 2019-10-21 18:45:25 +0200 | |
commit | 2bff275f39347c0c1fb06be38b3119fe7f23e273 (patch) | |
tree | 6adf96c87738394aa0736e215ba1005d83bedf19 | |
parent | Create STAFF_CHANNELS constant (diff) |
Show total infraction count only in staff channels
-rw-r--r-- | bot/cogs/moderation/infractions.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/cogs/moderation/infractions.py b/bot/cogs/moderation/infractions.py index f2ae7b95d..997ffe524 100644 --- a/bot/cogs/moderation/infractions.py +++ b/bot/cogs/moderation/infractions.py @@ -12,7 +12,7 @@ from discord.ext.commands import Context, command from bot import constants from bot.api import ResponseCodeError -from bot.constants import Colours, Event +from bot.constants import Colours, Event, STAFF_CHANNELS from bot.decorators import respect_role_hierarchy from bot.utils import time from bot.utils.checks import with_role_check @@ -465,6 +465,8 @@ class Infractions(Scheduler, commands.Cog): if infraction["actor"] == self.bot.user.id: end_msg = f" (reason: {infraction['reason']})" + elif ctx.channel.id not in STAFF_CHANNELS: + end_msg = '' else: infractions = await self.bot.api_client.get( "bot/infractions", |