From 19559728c45659304a2ffadbfebf502c268f22a5 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Tue, 24 Sep 2024 23:42:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=8F=E9=AA=8C=E4=B8=8D=E8=B6=B3=E4=BA=86?= =?UTF-8?q?=EF=BC=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/namerena.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/namerena.py b/plugins/namerena.py index 10bb842..432e092 100644 --- a/plugins/namerena.py +++ b/plugins/namerena.py @@ -147,7 +147,7 @@ def run_fights(msg: ReciveMessage, client) -> None: return # 以换行分割 fights = content.split("\n") - + def dispatch_msg(msg: ReciveMessage, client) -> None: @@ -155,12 +155,17 @@ def dispatch_msg(msg: ReciveMessage, client) -> None: return if msg.content == HELP_CMD: client.send_message(msg.reply_with(HELP_MSG)) - if msg.content.startswith(EVAL_CMD) or msg.content.startswith(EVAL_SIMPLE_CMD): + if msg.content.startswith(EVAL_CMD): eval_fight(msg, client) elif msg.content.startswith(FIGHT_CMD): run_fights(msg, client) elif msg.content.startswith(CONVERT_CMD): convert_name(msg, client) + elif msg.content.startswith(EVAL_SIMPLE_CMD): + # 放在最后, 避免覆盖 前面的命令 + # 同时过滤掉别的 /namer-xxxxx + if msg.content.find(" ") == -1: + return def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None: