From b3e95887634a06b30eed1eae8f0a479d213da507 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Mon, 10 Jun 2024 17:33:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=BF=E5=85=8D=E9=94=99=E8=AF=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A4=AA=E9=95=BF=EF=BC=8C=E4=BB=A5=E5=8F=8A=E5=8A=A0?= =?UTF-8?q?=E7=82=B9=E6=8F=90=E5=89=8D=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ica-rs/plugins/bmcl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ica-rs/plugins/bmcl.py b/ica-rs/plugins/bmcl.py index 106f07e..2c66fd3 100644 --- a/ica-rs/plugins/bmcl.py +++ b/ica-rs/plugins/bmcl.py @@ -323,6 +323,8 @@ def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None: bangbang_img(msg, client) except: # noqa report_msg = f"bmcl插件发生错误,请呼叫shenjack\n{traceback.format_exc()}" + if len(report_msg) > 200: + report_msg = report_msg[:200] + "..." # 防止消息过长 reply = msg.reply_with(report_msg) client.send_and_warn(reply) @@ -364,6 +366,8 @@ def on_tailchat_message(msg, client) -> None: bangbang_img(msg, client) except: # noqa report_msg = f"bmcl插件发生错误,请呼叫shenjack\n{traceback.format_exc()}" + if len(report_msg) > 200: + report_msg = report_msg[:200] + "..." # 防止消息过长 reply = msg.reply_with(report_msg) client.send_and_warn(reply)