- If you unregister and then list your alerts, the bot will be sad

This commit is contained in:
Emily Doherty 2025-11-04 21:06:40 -08:00
parent c5bb53c0e7
commit 0d0fe8e685

View File

@ -320,6 +320,11 @@ class Tracker(Extension):
async def get_current_token(self, ctx: SlashContext, flavor: Flavor) -> str:
user: User = await self._users.get(ctx.user.id)
if user.region.name is None:
return (
f"Please register with a region before attempting to list alerts using\n"
"```/register```"
)
region = user.region.name
region_history = self._history_manager.get_history(flavor, user.region)
price_movement_str = format(region_history.last_price_movement, ",")