From 1ec403c4f74dd3dab71941e9d9c5da68a698539c Mon Sep 17 00:00:00 2001 From: A0000Xz <122650088+A0000Xz@users.noreply.github.com> Date: Tue, 15 Jul 2025 21:13:47 +0800 Subject: [PATCH] Update message_api.py --- src/plugin_system/apis/message_api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugin_system/apis/message_api.py b/src/plugin_system/apis/message_api.py index b720bb23..40267663 100644 --- a/src/plugin_system/apis/message_api.py +++ b/src/plugin_system/apis/message_api.py @@ -472,10 +472,12 @@ async def get_person_ids_from_messages(messages: List[Dict[str, Any]]) -> List[s def filter_mai_messages(messages: List[Dict[str, Any]]) -> List[Dict[str, Any]]: """ - 从消息列表中移除麦麦的消息 + 从消息列表中移除麦麦的消息并顺便过滤掉已经被命令截断的消息 Args: messages: 消息列表,每个元素是消息字典 Returns: 过滤后的消息列表 """ - return [msg for msg in messages if msg.get("user_id") != str(global_config.bot.qq_account)] + return [msg for msg in messages if msg.get("user_id") != str(global_config.bot.qq_account) + and msg.get("interested_rate") is not None + ]