aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/christmas/adventofcode.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/seasons/christmas/adventofcode.py')
-rw-r--r--bot/seasons/christmas/adventofcode.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/seasons/christmas/adventofcode.py b/bot/seasons/christmas/adventofcode.py
index 3750964a..fe2fa956 100644
--- a/bot/seasons/christmas/adventofcode.py
+++ b/bot/seasons/christmas/adventofcode.py
@@ -407,6 +407,11 @@ class AdventOfCode(commands.Cog):
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:
"""Object representing the Advent of Code user."""