Added some more exceptions to handle

This commit is contained in:
Profitroll 2023-01-03 14:30:29 +01:00
parent 7edffd0b40
commit e79edf1dff

View File

@ -22,7 +22,7 @@ async def cmd_application(app: Client, msg: Message):
except (ValueError, UserNotFoundError): except (ValueError, UserNotFoundError):
try: try:
holo_user = HoloUser((await app.get_users(msg.command[1])).id) holo_user = HoloUser((await app.get_users(msg.command[1])).id)
except (bad_request_400.UsernameInvalid, bad_request_400.PeerIdInvalid): except (bad_request_400.UsernameInvalid, bad_request_400.PeerIdInvalid, bad_request_400.UsernameNotOccupied):
await msg.reply_text(locale("no_user_application", "message", locale=msg.from_user).format(msg.command[1]), quote=should_quote(msg)) await msg.reply_text(locale("no_user_application", "message", locale=msg.from_user).format(msg.command[1]), quote=should_quote(msg))
return return