mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
🚑 修复插件配置项显示 (#1824)
This commit is contained in:
parent
e124c1dbdb
commit
893611def0
@ -49,7 +49,7 @@ def _handle_config(plugin: Plugin, exists_module: list[str]):
|
|||||||
arg_parser=reg_config.arg_parser,
|
arg_parser=reg_config.arg_parser,
|
||||||
_override=False,
|
_override=False,
|
||||||
)
|
)
|
||||||
exists_module.append(f"{module}:{reg_config.key}")
|
exists_module.append(f"{module}:{reg_config.key}".lower())
|
||||||
|
|
||||||
|
|
||||||
def _generate_simple_config(exists_module: list[str]):
|
def _generate_simple_config(exists_module: list[str]):
|
||||||
@ -71,7 +71,7 @@ def _generate_simple_config(exists_module: list[str]):
|
|||||||
try:
|
try:
|
||||||
if _data.get(module) and k in _data[module].keys():
|
if _data.get(module) and k in _data[module].keys():
|
||||||
Config.set_config(module, k, _data[module][k])
|
Config.set_config(module, k, _data[module][k])
|
||||||
if f"{module}:{k}" in exists_module:
|
if f"{module}:{k}".lower() in exists_module:
|
||||||
_tmp_data[module][k] = Config.get_config(module, k)
|
_tmp_data[module][k] = Config.get_config(module, k)
|
||||||
except AttributeError as e:
|
except AttributeError as e:
|
||||||
raise AttributeError(f"{e}\n可能为config.yaml配置文件填写不规范") from e
|
raise AttributeError(f"{e}\n可能为config.yaml配置文件填写不规范") from e
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user