From c5892c76f257cf14ddfad5cb4ccf47ff86623a47 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Mon, 24 Feb 2020 12:27:02 -0800 Subject: HelpChannels: set a ready event when cog initialisation completes --- bot/cogs/help_channels.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 3865183b0..6dd689727 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -56,6 +56,7 @@ class HelpChannels(Scheduler, commands.Cog): self.channel_queue: asyncio.Queue = None self.name_queue: deque = None + self.ready = asyncio.Event() self.init_task = asyncio.create_task(self.init_cog()) async def cog_unload(self) -> None: @@ -108,6 +109,8 @@ class HelpChannels(Scheduler, commands.Cog): await self.init_available() await self.move_idle_channels() + self.ready.set() + async def move_idle_channels(self) -> None: """Make all idle in-use channels dormant.""" -- cgit v1.2.3