From 74e84c744a9e52be350472d5aead734c12f0b77f Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Wed, 13 Mar 2024 16:31:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=9E=E5=A4=8D=E5=B9=B6at=E6=9C=BA?= =?UTF-8?q?=E5=99=A8=E4=BA=BA=E6=97=B6=E4=BC=9A=E5=A4=9A=E4=B8=80=E4=B8=AA?= =?UTF-8?q?at=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/pipeline/resprule/rules/atbot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/pipeline/resprule/rules/atbot.py b/pkg/pipeline/resprule/rules/atbot.py index 293cfd96..4b39409c 100644 --- a/pkg/pipeline/resprule/rules/atbot.py +++ b/pkg/pipeline/resprule/rules/atbot.py @@ -20,6 +20,10 @@ class AtBotRule(rule_model.GroupRespondRule): if message_chain.has(mirai.At(query.adapter.bot_account_id)) and rule_dict['at']: message_chain.remove(mirai.At(query.adapter.bot_account_id)) + + if message_chain.has(mirai.At(query.adapter.bot_account_id)): # 回复消息时会at两次,检查并删除重复的 + message_chain.remove(mirai.At(query.adapter.bot_account_id)) + return entities.RuleJudgeResult( matching=True, replacement=message_chain,