From d5643502756207d8ad690c8e0a55dbb5e3133bda Mon Sep 17 00:00:00 2001 From: shenjack-5600u <3695888@qq.com> Date: Sun, 5 May 2024 22:50:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8D=E5=BE=AE=E6=94=B9=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ica-rs/plugins/namerena.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ica-rs/plugins/namerena.py b/ica-rs/plugins/namerena.py index fe133bc..704251e 100644 --- a/ica-rs/plugins/namerena.py +++ b/ica-rs/plugins/namerena.py @@ -15,21 +15,21 @@ else: IcaNewMessage = TypeVar("NewMessage") IcaClient = TypeVar("IcaClient") -_version_ = "0.1.0" +_version_ = "0.2.0" def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None: - if not msg.content.startswith("/name"): + if not msg.content.startswith("/namerena"): return if msg.content.find("\n") == -1: client.send_message( msg.reply_with( - "请使用 /name 命令,然后换行输入名字,例如:\n/name\n张三\n李四\n王五\n" + "请使用 /namerena 命令,然后换行输入名字,例如:\n/namerena\n张三\n李四\n王五\n" ) ) return # 去掉 /name - names = msg.content.split("/name")[1] + names = msg.content.split("/namerena")[1] # 去掉第一个 \n names = names[names.find("\n") + 1 :]