diff options
| author | 2020-08-07 11:08:12 -0700 | |
|---|---|---|
| committer | 2020-08-07 11:08:12 -0700 | |
| commit | 806825ec56e13391fecd45ba0e0da6ab365e11ec (patch) | |
| tree | 85027621b7398d36aa84213231a836b78cbe2b95 | |
| parent | HelpChannels: add logging to is_empty (diff) | |
HelpChannels: simplify control flow in is_empty
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/help_channels.py | 6 | 
1 files changed, 2 insertions, 4 deletions
| diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index a13207d20..bdfbf3392 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -739,7 +739,6 @@ 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.          # If AVAILABLE_MSG isn't found within 100 messages, then assume the channel is not empty. @@ -751,10 +750,9 @@ class HelpChannels(commands.Cog):              if self.match_bot_embed(msg, AVAILABLE_MSG):                  log.trace(f"#{channel} ({channel.id}) has the available message embed.") -                found = True -                break +                return True -        return found +        return False      async def check_cooldowns(self) -> None:          """Remove expired cooldowns and re-schedule active ones.""" | 
