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是否可用"""