mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-23 04:09:59 +00:00
fix(topic_analyzer): 话题分析处理历史消息跳过机器人列表中的消息
This commit is contained in:
@@ -80,6 +80,15 @@ class TopicAnalyzer(BaseAnalyzer):
|
||||
)
|
||||
continue
|
||||
|
||||
# 获取发送者ID并过滤机器人消息
|
||||
user_id = str(sender.get("user_id", ""))
|
||||
bot_qq_ids = self.config_manager.get_bot_qq_id()
|
||||
|
||||
# 跳过机器人自己的消息
|
||||
if bot_qq_ids and user_id in [str(qq) for qq in bot_qq_ids]:
|
||||
logger.debug(f"build_prompt 过滤掉机器人QQ号: {user_id}")
|
||||
continue
|
||||
|
||||
nickname = InfoUtils.get_user_nickname(self.config_manager, sender)
|
||||
msg_time = datetime.fromtimestamp(msg.get("time", 0)).strftime("%H:%M")
|
||||
|
||||
@@ -314,6 +323,15 @@ class TopicAnalyzer(BaseAnalyzer):
|
||||
)
|
||||
continue
|
||||
|
||||
# 获取发送者ID并过滤机器人消息
|
||||
user_id = str(sender.get("user_id", ""))
|
||||
bot_qq_ids = self.config_manager.get_bot_qq_id()
|
||||
|
||||
# 跳过机器人自己的消息
|
||||
if bot_qq_ids and user_id in [str(qq) for qq in bot_qq_ids]:
|
||||
logger.debug(f"extract_text_messages 过滤掉机器人QQ号: {user_id}")
|
||||
continue
|
||||
|
||||
nickname = InfoUtils.get_user_nickname(self.config_manager, sender)
|
||||
msg_time = datetime.fromtimestamp(msg.get("time", 0)).strftime("%H:%M")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user