aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/christmas/advent_of_code
diff options
context:
space:
mode:
authorGravatar Xithrius <[email protected]>2021-03-10 11:28:57 -0800
committerGravatar GitHub <[email protected]>2021-03-10 11:28:57 -0800
commit6e9a71c23b2cac5e5f6f581c36d284da11702a45 (patch)
treeb9e4cea4aa0a5719c9d8552b74490e8ffbbbde83 /bot/exts/christmas/advent_of_code
parentsuggestion by @Xithrius (diff)
parentMerge pull request #616 from python-discord/aoc-fixes (diff)
Merge branch 'master' into earth_photos
Diffstat (limited to 'bot/exts/christmas/advent_of_code')
-rw-r--r--bot/exts/christmas/advent_of_code/_cog.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/bot/exts/christmas/advent_of_code/_cog.py b/bot/exts/christmas/advent_of_code/_cog.py
index 466edd48..29902306 100644
--- a/bot/exts/christmas/advent_of_code/_cog.py
+++ b/bot/exts/christmas/advent_of_code/_cog.py
@@ -36,9 +36,6 @@ class AdventOfCode(commands.Cog):
self.about_aoc_filepath = Path("./bot/resources/advent_of_code/about.json")
self.cached_about_aoc = self._build_about_embed()
- self.countdown_task = None
- self.status_task = None
-
notification_coro = _helpers.new_puzzle_notification(self.bot)
self.notification_task = self.bot.loop.create_task(notification_coro)
self.notification_task.set_name("Daily AoC Notification")
@@ -173,6 +170,7 @@ class AdventOfCode(commands.Cog):
else:
await ctx.message.add_reaction(Emojis.envelope)
+ @in_month(Month.DECEMBER)
@adventofcode_group.command(
name="leaderboard",
aliases=("board", "lb"),
@@ -198,6 +196,7 @@ class AdventOfCode(commands.Cog):
await ctx.send(content=f"{header}\n\n{table}", embed=info_embed)
+ @in_month(Month.DECEMBER)
@adventofcode_group.command(
name="global",
aliases=("globalboard", "gb"),
@@ -268,7 +267,7 @@ class AdventOfCode(commands.Cog):
def cog_unload(self) -> None:
"""Cancel season-related tasks on cog unload."""
log.debug("Unloading the cog and canceling the background task.")
- self.countdown_task.cancel()
+ self.notification_task.cancel()
self.status_task.cancel()
def _build_about_embed(self) -> discord.Embed: