From e4ddd08bb7eb9f9ded8453853a8a06f3dfb63471 Mon Sep 17 00:00:00 2001 From: yasir Date: Sun, 12 Mar 2023 19:38:50 +0700 Subject: [PATCH] Some fix --- misskaty/plugins/dev.py | 2 +- misskaty/plugins/misc_tools.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/misskaty/plugins/dev.py b/misskaty/plugins/dev.py index 6991e54e..ca3dd9c0 100644 --- a/misskaty/plugins/dev.py +++ b/misskaty/plugins/dev.py @@ -143,7 +143,7 @@ async def shell(_, m): @app.on_edited_message((filters.command(["ev", "run"]) | filters.regex(r"app.run\(\)$")) & filters.user(SUDO)) @user.on_message(filters.command(["ev", "run"], ".") & filters.me) async def evaluation_cmd_t(_, m): - if len(m.command) == 1 and m.command: + if m.command and len(m.command) == 1: return await edit_or_reply(m, text="__No evaluate message!__") cmd = m.text.split(" ", 1)[1] if m.command else m.text.split("app.run()")[0] status_message = await editPesan(m, "Processing eval pyrogram..") if m.from_user.is_self else await kirimPesan(m, "Processing eval pyrogram..") diff --git a/misskaty/plugins/misc_tools.py b/misskaty/plugins/misc_tools.py index e4fdb06e..93b432c3 100644 --- a/misskaty/plugins/misc_tools.py +++ b/misskaty/plugins/misc_tools.py @@ -58,7 +58,9 @@ def remove_html_tags(text): @app.on_message(filters.command("readqr", COMMAND_HANDLER)) @ratelimiter async def readqr(c, m): - if not m.reply and (not m.reply.media and not m.reply.photo): + if not m.reply_to_message: + return await m.reply("Please reply photo that contain valid QR Code.") + if not m.reply_to_message.photo: return await m.reply("Please reply photo that contain valid QR Code.") foto = await m.reply_to_message.download() myfile = {'file': (foto, open(foto, 'rb'),'application/octet-stream')}