Make info not puke a huge ass exception
This commit is contained in:
parent
55d41e65cc
commit
c0e1f55c01
|
@ -38,7 +38,11 @@ async def info(client, message):
|
|||
entity = ' '.join(command)
|
||||
elif not getattr(message.reply_to_message, 'empty', True):
|
||||
entity = message.reply_to_message.from_user or message.reply_to_message.chat
|
||||
entity, entity_client = await get_entity(client, entity)
|
||||
try:
|
||||
entity, entity_client = await get_entity(client, entity)
|
||||
except Exception as ex:
|
||||
await message.reply_text(f'{type(ex).__name__}: {str(ex)}', parse_mode=None)
|
||||
return
|
||||
text_ping = _generate_sexy(entity, True)
|
||||
text_unping = _generate_sexy(entity, False)
|
||||
text_ping += f'\n<b>ID:</b> <code>{entity.id}</code>'
|
||||
|
|
Loading…
Reference in New Issue