aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/christmas/adventofcode.py
diff options
context:
space:
mode:
authorGravatar ByteCommander <[email protected]>2018-12-03 03:00:00 +0100
committerGravatar ByteCommander <[email protected]>2018-12-03 03:00:00 +0100
commit80e12b556ea605fd2a41330839c4ab159612b658 (patch)
tree43677c1b4fdab4235a644f83cf4a60e16b72e4e7 /bot/seasons/christmas/adventofcode.py
parentSplit .notifications toggle command into .subscribe and .unsubscribe (diff)
Various fixes from review (squished)
Diffstat (limited to 'bot/seasons/christmas/adventofcode.py')
-rw-r--r--bot/seasons/christmas/adventofcode.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/seasons/christmas/adventofcode.py b/bot/seasons/christmas/adventofcode.py
index b428896b..527697f2 100644
--- a/bot/seasons/christmas/adventofcode.py
+++ b/bot/seasons/christmas/adventofcode.py
@@ -138,16 +138,17 @@ class AdventOfCode:
Assign the role for notifications about new days being ready.
"""
role = ctx.guild.get_role(AocConfig.role_id)
+ unsubscribe_command = f"{ctx.prefix}{ctx.command.root_parent} unsubscribe"
if role not in ctx.author.roles:
await ctx.author.add_roles(role)
await ctx.send("Okay! You have been __subscribed__ to notifications about new Advent of Code tasks. "
- f"You can run `{ctx.prefix}unsubscribe` to disable them again for you.")
+ f"You can run `{unsubscribe_command}` to disable them again for you.")
else:
await ctx.send("Hey, you already are receiving notifications about new Advent of Code tasks. "
- f"If you don't want them any more, run `{ctx.prefix}unsubscribe` instead.")
+ f"If you don't want them any more, run `{unsubscribe_command}` instead.")
- @adventofcode_group.command(name="unsubscribe", aliases=("unsub"), brief="Notifications for new days")
+ @adventofcode_group.command(name="unsubscribe", aliases=("unsub",), brief="Notifications for new days")
async def aoc_unsubscribe(self, ctx: commands.Context):
"""
Remove the role for notifications about new days being ready.