From eeb8ed0cc28567b66f43705474877c56bd4bcc94 Mon Sep 17 00:00:00 2001 From: blank X Date: Thu, 24 Dec 2020 21:58:18 +0700 Subject: [PATCH] Fix some things --- sukuinote/plugins/saucenao.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sukuinote/plugins/saucenao.py b/sukuinote/plugins/saucenao.py index 38deb61..25a696f 100644 --- a/sukuinote/plugins/saucenao.py +++ b/sukuinote/plugins/saucenao.py @@ -87,13 +87,15 @@ async def saucenao(client, message): await download_file(result['header']['thumbnail'], filename) to_image = True 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 text += atext try: await message.reply_photo(filename, caption=caption) except Exception: - await message.reply_text(text) + await reply.edit_text(text) + else: + await reply.delete() help_dict['saucenao'] = ('saucenao', '''{prefix}saucenao (as caption of Photo/GIF/Video/Sticker or reply) - Reverse searches anime art, thanks to saucenao.com