diff options
| author | 2020-02-24 14:30:55 -0800 | |
|---|---|---|
| committer | 2020-03-22 15:54:35 -0700 | |
| commit | 72e564a6704850a54831aab5c4d9d777a21a4f27 (patch) | |
| tree | 667317b4a7ad647b6ea2e7ede4dd27926b6b86a0 | |
| parent | Constants: add a help channel name prefix constant (diff) | |
Constants: implement init_available
Initialises the Available category with channels if any are missing.
| -rw-r--r-- | bot/cogs/help_channels.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 026cb1f78..06520fc08 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -122,6 +122,11 @@ class HelpChannels(Scheduler, commands.Cog): async def init_available(self) -> None: """Initialise the Available category with channels.""" + channels = list(self.get_category_channels(self.available_category)) + missing = constants.HelpChannels.max_available - len(channels) + + for _ in range(missing): + await self.move_to_available() async def init_categories(self) -> None: """Get the help category objects. Remove the cog if retrieval fails.""" |