Skip to content

Commit

Permalink
Update registration checking for users
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCatster committed Feb 27, 2022
1 parent 3849d38 commit de13745
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@


async def check_registration(ctx: lightbulb.Context, user_id: int):
user = await User.load(user_id=user_id)
if user is None:
await ctx.respond(
"You are not registered! Please verify before updating your profile."
)
return False
else:
try:
user = bot.user_data[user_id]

return True
except Exception as e:
logging.info(f"Excepting, continuing to note unregistered user: {e}")
await ctx.respond("You are not registered! Please register using /verify.")

return False


async def preload_user_data():
Expand Down

0 comments on commit de13745

Please sign in to comment.