From 6774bb93836c2264d015ff9b9625dae6a91b1d56 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Sat, 29 Feb 2020 11:08:07 -0800 Subject: HelpChannels: initialise available channels after moving idle ones This will ensure the maximum amount of dormant channels possible before attempting to move any to the available category. It also allows the dormant command to already be enabled in case there are still no dormant channels when trying to init available channels. --- bot/cogs/help_channels.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index d769b2619..2fd5cc851 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -348,8 +348,6 @@ class HelpChannels(Scheduler, commands.Cog): self.channel_queue = self.create_channel_queue() self.name_queue = self.create_name_queue() - await self.init_available() - log.trace("Moving or rescheduling in-use channels.") for channel in self.get_category_channels(self.in_use_category): await self.move_idle_channel(channel, has_task=False) @@ -360,6 +358,8 @@ class HelpChannels(Scheduler, commands.Cog): # This may confused users. So would potentially long delays for the cog to become ready. self.dormant_command.enabled = True + await self.init_available() + log.info("Cog is ready!") self.ready.set() -- cgit v1.2.3