- If you unregister and then list your alerts, the bot will be sad
This commit is contained in:
parent
c5bb53c0e7
commit
0d0fe8e685
@ -320,6 +320,11 @@ class Tracker(Extension):
|
|||||||
|
|
||||||
async def get_current_token(self, ctx: SlashContext, flavor: Flavor) -> str:
|
async def get_current_token(self, ctx: SlashContext, flavor: Flavor) -> str:
|
||||||
user: User = await self._users.get(ctx.user.id)
|
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 = user.region.name
|
||||||
region_history = self._history_manager.get_history(flavor, user.region)
|
region_history = self._history_manager.get_history(flavor, user.region)
|
||||||
price_movement_str = format(region_history.last_price_movement, ",")
|
price_movement_str = format(region_history.last_price_movement, ",")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user