Skip to content

Commit

Permalink
Bug Fix in handle.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jtyliu committed Mar 12, 2022
1 parent ffaf5a8 commit 0cfb944
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions extensions/handles.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,12 @@ async def _set(ctx):
query = Query()

if username != "+remove":
user = await query.get_user(username)
try:
user = await query.get_user(username)

if user is None:
if user is None:
raise ObjectNotFound()
except ObjectNotFound:
await ctx.respond(escape_markdown(f"{username} does not exist on dmoj"))
return

Expand Down

0 comments on commit 0cfb944

Please sign in to comment.