diff options
author | 2021-03-09 19:12:02 -0800 | |
---|---|---|
committer | 2021-03-09 19:12:02 -0800 | |
commit | 3454a88a43bec5d0959495c99b28ed80e96f12fb (patch) | |
tree | bacf3967df4494c7dbbcc168238aaa4c91501860 | |
parent | Merge pull request #462 from AtieP/master (diff) | |
parent | Remove useless initialization in the AoC cog (diff) |
Merge pull request #616 from python-discord/aoc-fixes
Aoc fixes
-rw-r--r-- | bot/exts/christmas/advent_of_code/_cog.py | 7 |
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: |