diff options
Diffstat (limited to 'bot/seasons/christmas/adventofcode.py')
-rw-r--r-- | bot/seasons/christmas/adventofcode.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/seasons/christmas/adventofcode.py b/bot/seasons/christmas/adventofcode.py index 3750964a..818e5748 100644 --- a/bot/seasons/christmas/adventofcode.py +++ b/bot/seasons/christmas/adventofcode.py @@ -406,6 +406,11 @@ class AdventOfCode(commands.Cog): self.cached_global_leaderboard = await AocGlobalLeaderboard.from_url() else: self.cached_private_leaderboard = await AocPrivateLeaderboard.from_url() + + def cog_unload(self) -> None: + """Cancel season-related tasks on cog unload.""" + self.countdown_task.cancel() + self.status_task.cancel() class AocMember: |