Fail even if error is none

This commit is contained in:
blank X 2020-11-13 19:41:17 +07:00
parent ba7f2b6f99
commit 7cda647899
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ async def nhentai_comment_info(client, message):
async with session.get(f'https://nhentai.net/api/gallery/{sauce}') as resp:
info = await resp.json()
text = f'<b>{sauce}</b>\n<b>'
if info.get('error'):
if 'error' in info:
text += f'Error:</b> {html.escape(info.get("error"))}'
else:
text += 'Title:</b> '