diff options
author | 2020-08-04 13:57:14 -0700 | |
---|---|---|
committer | 2020-08-04 13:57:14 -0700 | |
commit | f2779147f1e3c99436c1437c9b405479e498c17f (patch) | |
tree | b211a0969f5be9afd1aed17a5feee1dae2525850 | |
parent | HelpChannels: more accurate empty check (diff) |
HelpChannels: add logging to is_empty
-rw-r--r-- | bot/cogs/help_channels.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 5ecf40e54..a13207d20 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -738,6 +738,7 @@ class HelpChannels(commands.Cog): async def is_empty(self, channel: discord.TextChannel) -> bool: """Return True if there's an AVAILABLE_MSG and the messages leading up are bot messages.""" + log.trace(f"Checking if #{channel} ({channel.id}) is empty.") found = False # A limit of 100 results in a single API call. @@ -745,9 +746,11 @@ class HelpChannels(commands.Cog): # Not gonna do an extensive search for it cause it's too expensive. async for msg in channel.history(limit=100): if not msg.author.bot: + log.trace(f"#{channel} ({channel.id}) has a non-bot message.") return False if self.match_bot_embed(msg, AVAILABLE_MSG): + log.trace(f"#{channel} ({channel.id}) has the available message embed.") found = True break |