aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-02-24 17:14:08 -0800
committerGravatar MarkKoz <[email protected]>2020-03-22 15:54:37 -0700
commitd66c284034dec8352dc8a20ec1cb978c47f93d3d (patch)
tree89ef84bbbcaaf0688f33ec11adadd26f5c873fd7
parentHelpChannels: implement _scheduled_task (diff)
HelpChannels: wait for cog to be initialised before processing messages
Diffstat (limited to '')
-rw-r--r--bot/cogs/help_channels.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py
index 12bed2e61..43ce59cf1 100644
--- a/bot/cogs/help_channels.py
+++ b/bot/cogs/help_channels.py
@@ -276,6 +276,8 @@ class HelpChannels(Scheduler, commands.Cog):
@commands.Cog.listener()
async def on_message(self, message: discord.Message) -> None:
"""Move an available channel to the In Use category and replace it with a dormant one."""
+ await self.ready.wait()
+
available_channels = self.get_category_channels(self.available_category)
if message.channel not in available_channels:
return # Ignore messages outside the Available category.