Fix some things
This commit is contained in:
parent
5f3f92a7fc
commit
eeb8ed0cc2
|
@ -87,13 +87,15 @@ async def saucenao(client, message):
|
||||||
await download_file(result['header']['thumbnail'], filename)
|
await download_file(result['header']['thumbnail'], filename)
|
||||||
to_image = True
|
to_image = True
|
||||||
atext += '\n\n'
|
atext += '\n\n'
|
||||||
if len((await client.parser.parse(caption + atext))['message']) <= 1024:
|
if len((await client.parser.parse(caption + atext, 'html'))['message']) <= 1024:
|
||||||
caption += atext
|
caption += atext
|
||||||
text += atext
|
text += atext
|
||||||
try:
|
try:
|
||||||
await message.reply_photo(filename, caption=caption)
|
await message.reply_photo(filename, caption=caption)
|
||||||
except Exception:
|
except Exception:
|
||||||
await message.reply_text(text)
|
await reply.edit_text(text)
|
||||||
|
else:
|
||||||
|
await reply.delete()
|
||||||
|
|
||||||
help_dict['saucenao'] = ('saucenao',
|
help_dict['saucenao'] = ('saucenao',
|
||||||
'''{prefix}saucenao <i>(as caption of Photo/GIF/Video/Sticker or reply)</i> - Reverse searches anime art, thanks to saucenao.com
|
'''{prefix}saucenao <i>(as caption of Photo/GIF/Video/Sticker or reply)</i> - Reverse searches anime art, thanks to saucenao.com
|
||||||
|
|
Loading…
Reference in New Issue