mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-11 06:39:59 +08:00
🐛 修复Config add配置时显示问题 (#1835)
This commit is contained in:
@@ -266,6 +266,7 @@ class ConfigsManager:
|
||||
self._data: dict[str, ConfigGroup] = {}
|
||||
self._simple_data: dict = {}
|
||||
self._simple_file = DATA_PATH / "config.yaml"
|
||||
self.add_module = []
|
||||
_yaml = YAML()
|
||||
if file:
|
||||
file.parent.mkdir(exist_ok=True, parents=True)
|
||||
@@ -328,6 +329,7 @@ class ConfigsManager:
|
||||
|
||||
if not module or not key:
|
||||
raise ValueError("add_plugin_config: module和key不能为为空")
|
||||
self.add_module.append(f"{module}:{key}".lower())
|
||||
if module in self._data and (config := self._data[module].configs.get(key)):
|
||||
config.help = help
|
||||
config.arg_parser = arg_parser
|
||||
|
||||
Reference in New Issue
Block a user