From ca4eb6bcd82a2bfaf620aaab0a7acee607051dc3 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Mon, 24 Feb 2020 18:33:55 -0800 Subject: HelpChannels: fix creation of the init_cog task The task has to be created on a specific loop because when the cog is instantiated, the event loop is not yet running. --- bot/cogs/help_channels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 82dce4ee7..391d400b1 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -73,7 +73,7 @@ class HelpChannels(Scheduler, commands.Cog): self.ready = asyncio.Event() self.on_message_lock = asyncio.Lock() - self.init_task = asyncio.create_task(self.init_cog()) + self.init_task = self.bot.loop.create_task(self.init_cog()) def cog_unload(self) -> None: """Cancel the init task and scheduled tasks when the cog unloads.""" -- cgit v1.2.3