From 98fd257532bca4e4a060165ab57f552ea8dd91e6 Mon Sep 17 00:00:00 2001 From: Ri-Nai Date: Sat, 18 Oct 2025 23:23:54 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E6=B7=BB=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BE=A4=E5=90=8D=E7=89=87=E9=85=8D=E7=BD=AE=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E5=8F=8A=E8=8E=B7=E5=8F=96=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _conf_schema.json | 6 ++++++ src/core/config.py | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/_conf_schema.json b/_conf_schema.json index 6670997..93c5935 100644 --- a/_conf_schema.json +++ b/_conf_schema.json @@ -38,6 +38,12 @@ "default": "", "hint": "用于自动分析的机器人QQ号,填写后可启用自动分析功能" }, + "enable_user_card": { + "type": "bool", + "description": "使用用户群名片", + "default": false, + "hint": "在分析中优先使用用户的群名片作为昵称显示" + }, "output_format": { "type": "string", "description": "输出格式", diff --git a/src/core/config.py b/src/core/config.py index bb9b64a..8cc2eda 100644 --- a/src/core/config.py +++ b/src/core/config.py @@ -197,6 +197,10 @@ class ConfigManager: self.config["enabled_groups"] = enabled_groups self.config.save_config() + def get_enable_user_card(self) -> bool: + """获取是否使用用户群名片""" + return self.config.get("enable_user_card", False) + @property def pyppeteer_available(self) -> bool: """检查pyppeteer是否可用"""