diff options
author | 2020-04-20 14:09:31 -0700 | |
---|---|---|
committer | 2020-04-20 14:09:31 -0700 | |
commit | b842bfe9a1f5b811bc9cbfa0e354a01bbb02152e (patch) | |
tree | a4fc0ee6ddaefea9df8a87cecd16d0d7346f8a66 | |
parent | Extra documentation + split out to separate function (diff) |
HelpChannels: add logging to answered check
-rw-r--r-- | bot/cogs/help_channels.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 3c41673b4..9d7328739 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -597,6 +597,7 @@ class HelpChannels(Scheduler, commands.Cog): async def check_for_answer(self, message: discord.Message) -> None: """Checks for whether new content in a help channel comes from non-claimants.""" channel = message.channel + log.trace(f"Checking if #{channel} ({channel.id}) has been answered.") # Confirm the channel is an in use help channel if self.is_in_category(channel, constants.Categories.help_in_use): @@ -610,9 +611,9 @@ class HelpChannels(Scheduler, commands.Cog): self.unanswered[channel.id] = False # Change the emoji in the channel name to signify activity - await channel.edit( - name=f"{IN_USE_ANSWERED_EMOJI}{NAME_SEPARATOR}{self.get_clean_channel_name(channel)}" - ) + log.trace(f"#{channel} ({channel.id}) has been answered; changing its emoji") + name = self.get_clean_channel_name(channel) + await channel.edit(name=f"{IN_USE_ANSWERED_EMOJI}{NAME_SEPARATOR}{name}") @commands.Cog.listener() async def on_message(self, message: discord.Message) -> None: |