feat(filter_bot_messages): 新增 filter_bot 开关,控制 bot 消息是否纳入分析

Fixes #205

默认排除 bot 自身发言(filter_bot_messages=True),可通过 /分析设置 filter_bot 切换。
修改涉及三层:
1. 配置层:ConfigManager getter/setter + _conf_schema.json 面板选项
2. 适配器层:BotManager 传入配置,OneBotAdapter.fetch_messages 认 switch
3. 分析层:clean_messages 和 analyze_user_activity 的 bot_self_ids 受 switch 控制
This commit is contained in:
SXP-Simon
2026-07-21 15:42:47 +08:00
parent b88082f662
commit 3a03c1f272
6 changed files with 52 additions and 8 deletions
+6
View File
@@ -51,6 +51,12 @@
"type": "string"
}
},
"filter_bot_messages": {
"type": "bool",
"description": "分析时是否过滤机器人自己的消息",
"default": true,
"hint": "默认开启,bot 自身的发言不会出现在分析报告中。关闭后 bot 的发言也会被纳入话题分析、金句提取等。"
},
"enable_user_card": {
"type": "bool",
"description": "使用用户群名片",