From bf4067901281d968c28afadf458f05051d8bf3f2 Mon Sep 17 00:00:00 2001 From: shenjack-5600u <3695888@qq.com> Date: Wed, 5 Jun 2024 12:51:19 +0800 Subject: [PATCH] add tailchat adapt for namerena plugin --- ica-rs/plugins/namerena.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ica-rs/plugins/namerena.py b/ica-rs/plugins/namerena.py index 04a3e4d..e34a1d2 100644 --- a/ica-rs/plugins/namerena.py +++ b/ica-rs/plugins/namerena.py @@ -15,12 +15,12 @@ else: IcaNewMessage = TypeVar("NewMessage") IcaClient = TypeVar("IcaClient") -_version_ = "0.4.1" +_version_ = "0.4.2" COMMAND = "/namerena" def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None: - if not msg.content.startswith("/namerena"): + if not msg.content.startswith("/namerena") or msg.is_reply: return if msg.content.find("\n") == -1: client.send_message( @@ -63,3 +63,7 @@ def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None: # 发送错误 reply = msg.reply_with(f"发生错误:{e}\n{traceback.format_exc()}") client.send_message(reply) + + +def on_tailchat_message(msg, client) -> None: + on_ica_message(msg, client)