Register now opens a direct message with you

This commit is contained in:
Emily Doherty 2024-12-03 17:56:50 -08:00
parent ec1bf6f1d1
commit 99ad0f79d9

View File

@ -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')