[feat] 添加用户群名片配置选项及获取方法

This commit is contained in:
Ri-Nai
2025-10-18 23:23:54 +08:00
parent 7323e1184a
commit 98fd257532
2 changed files with 10 additions and 0 deletions
+6
View File
@@ -38,6 +38,12 @@
"default": "",
"hint": "用于自动分析的机器人QQ号,填写后可启用自动分析功能"
},
"enable_user_card": {
"type": "bool",
"description": "使用用户群名片",
"default": false,
"hint": "在分析中优先使用用户的群名片作为昵称显示"
},
"output_format": {
"type": "string",
"description": "输出格式",
+4
View File
@@ -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是否可用"""