diff options
| -rw-r--r-- | bot/cogs/help_channels.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bot/cogs/help_channels.py b/bot/cogs/help_channels.py index 6b77f9955..f493e5918 100644 --- a/bot/cogs/help_channels.py +++ b/bot/cogs/help_channels.py @@ -74,10 +74,13 @@ class HelpChannels(Scheduler, commands.Cog): self.ready = asyncio.Event() self.init_task = asyncio.create_task(self.init_cog()) - async def cog_unload(self) -> None: - """Cancel the init task if the cog unloads.""" + def cog_unload(self) -> None: + """Cancel the init task and scheduled tasks when the cog unloads.""" self.init_task.cancel() + for task in self.scheduled_tasks.values(): + task.cancel() + def create_channel_queue(self) -> asyncio.Queue: """ Return a queue of dormant channels to use for getting the next available channel. |