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 @@ async def match( 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,