commit 99ad0f79d95ba3a291a11cf3ec6d7bbd745dc255
parent ec1bf6f1d163566a6d8c48dc25c6718ebddcce49
Author: Emily Doherty <git@emily.sh>
Date: Tue, 3 Dec 2024 17:56:50 -0800
Register now opens a direct message with you
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/token_bot/tracker.py b/token_bot/tracker.py
@@ -110,7 +110,8 @@ class Tracker(Extension):
"* You can only be registered with one region at a time \n"
"* Changing your region will remove all previous alerts you have signed up for \n"
"* You can remove all alerts and registration using ```/remove-registration```")
- await ctx.send(text, components=REGION_MENU, ephemeral=True)
+ menu = copy.deepcopy(REGION_MENU)
+ await ctx.send(text, components=menu, ephemeral=True)
@slash_command(
name="remove-registration",
@@ -235,6 +236,10 @@ class Tracker(Extension):
async def region_menu(self, ctx: ComponentContext):
user = User(ctx.user.id, Region(ctx.values[0].lower()), subscribed_alerts=[])
await self._users.add(user)
+ discord_user = await self.bot.fetch_user(user.user_id)
+ await discord_user.send("You have successfully registered with TokenBot!\n"
+ "Most interactions will happen in direct messages with TokenBot here.\n"
+ "You can remove your registration and alerts at any time using ```/remove-registration```\n")
await ctx.send(f"Successfully registered with the {ctx.values[0]} region", ephemeral=True)
@component_callback('high_alert_button')