From 27e04f10a47f1b568db6525f8cbbbb9a5931a12c Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Wed, 28 Aug 2024 01:27:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E4=B8=80=E4=B8=8B=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/namerena.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/namerena.py b/plugins/namerena.py index a520572..e03ecee 100644 --- a/plugins/namerena.py +++ b/plugins/namerena.py @@ -33,7 +33,7 @@ else: TailchatReciveMessage = TypeVar("TailchatReciveMessage") -_version_ = "0.6.0" +_version_ = "0.6.1" EVAL_PREFIX = "/namerena" CONVERT_PREFIX = "/namer-peek" @@ -82,6 +82,10 @@ def eval_fight(msg: ReciveMessage, client) -> None: names = msg.content[len(EVAL_PREFIX) :] # 去掉第一个 \n names = names[names.find("\n") + 1 :] + # 判空, 别报错了 + if names.strip() == "": + client.send_message(msg.reply_with("请输入名字")) + return start_time = time.time() # 开始 try