From 0efd5364804cb122a0115bd0b49c4a7db3765b85 Mon Sep 17 00:00:00 2001 From: lowking <33308659+lowking@users.noreply.github.com> Date: Mon, 24 May 2021 09:44:23 +0800 Subject: [PATCH] optimize --- pl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pl.py b/pl.py index 50ff89c..6a24ea8 100644 --- a/pl.py +++ b/pl.py @@ -43,7 +43,10 @@ async def pl(context): txt = a.text.replace("嘌呤含量", "➟ ") result = f"{result}{txt}\n" status = True - await context.edit(result) + if result == "": + await context.edit("没有查到结果") + else: + await context.edit(result) break except: pass