aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2020-02-24 18:33:55 -0800
committerGravatar MarkKoz <[email protected]>2020-03-22 15:54:37 -0700
commitca4eb6bcd82a2bfaf620aaab0a7acee607051dc3 (patch)
tree69aa5f6a3a81d6c87b57fe93ef3f4838659ab9e3
parentRemove the free extension (diff)
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.
-rw-r--r--bot/cogs/help_channels.py2
1 files changed, 1 insertions, 1 deletions
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."""