diff options
Diffstat (limited to 'bot/seasons/christmas/adventofcode.py')
-rw-r--r-- | bot/seasons/christmas/adventofcode.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bot/seasons/christmas/adventofcode.py b/bot/seasons/christmas/adventofcode.py index bbfe0a69..71da8d94 100644 --- a/bot/seasons/christmas/adventofcode.py +++ b/bot/seasons/christmas/adventofcode.py @@ -199,7 +199,7 @@ class AdventOfCode(commands.Cog): """Respond with an explanation of all things Advent of Code.""" await ctx.send("", embed=self.cached_about_aoc) - @adventofcode_group.command(name="join", aliases=("j",), brief="Learn how to join PyDis' private AoC leaderboard") + @adventofcode_group.command(name="join", aliases=("j",), brief="Learn how to join the leaderboard (via DM)") @override_in_channel(AOC_WHITELIST) async def join_leaderboard(self, ctx: commands.Context) -> None: """DM the user the information for joining the PyDis AoC private leaderboard.""" @@ -215,6 +215,8 @@ class AdventOfCode(commands.Cog): except discord.errors.Forbidden: log.debug(f"{author.name} ({author.id}) has disabled DMs from server members") await ctx.send(f":x: {author.mention}, please (temporarily) enable DMs to receive the join code") + else: + await ctx.message.add_reaction(Emojis.envelope) @adventofcode_group.command( name="leaderboard", @@ -418,6 +420,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.""" |