diff options
| author | 2020-05-22 11:11:43 -0700 | |
|---|---|---|
| committer | 2020-05-22 11:31:59 -0700 | |
| commit | d3550ce1138e1b00e64ba355a09a08b480b077e6 (patch) | |
| tree | 258b40ed7f40ba70f93acfb8989e772360525611 | |
| parent | Help: Create `embed_description_match` (diff) | |
HelpChannels: fix `is_empty` not being awaited
| -rw-r--r-- | bot/cogs/help_channels.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 554fdc55e..2aec22be4 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -468,7 +468,7 @@ class HelpChannels(Scheduler, commands.Cog): """ log.trace(f"Handling in-use channel #{channel} ({channel.id}).") - if not self.is_empty(channel): + if not await self.is_empty(channel): idle_seconds = constants.HelpChannels.idle_minutes * 60 else: idle_seconds = constants.HelpChannels.deleted_idle_minutes * 60 @@ -731,7 +731,10 @@ class HelpChannels(Scheduler, commands.Cog): The new time for the dormant task is configured with `HelpChannels.deleted_idle_minutes`. """ - if not self.is_in_category(msg.channel, constants.Categories.help_in_use) or not self.is_empty(msg.channel): + if not self.is_in_category(msg.channel, constants.Categories.help_in_use): + return + + if not await self.is_empty(msg.channel): return log.info(f"Claimant of #{msg.channel} ({msg.author}) deleted message, channel is empty now. Rescheduling task.") |