mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
perf👌: 完善插件管理api
This commit is contained in:
parent
3bfb3620f1
commit
9a1510fe7e
@ -111,10 +111,10 @@ def _(plugin: UpdatePlugin) -> Result:
|
|||||||
for key in plugin.configs:
|
for key in plugin.configs:
|
||||||
if c := configs.configs.get(key):
|
if c := configs.configs.get(key):
|
||||||
value = plugin.configs[key]
|
value = plugin.configs[key]
|
||||||
if isinstance(c.value, (list, tuple)) or isinstance(
|
# if isinstance(c.value, (list, tuple)) or isinstance(
|
||||||
c.default_value, (list, tuple)
|
# c.default_value, (list, tuple)
|
||||||
):
|
# ):
|
||||||
value = value.split(",")
|
# value = value.split(",")
|
||||||
if c.type and value is not None:
|
if c.type and value is not None:
|
||||||
value = cattrs.structure(value, c.type)
|
value = cattrs.structure(value, c.type)
|
||||||
Config.set_config(module, key, value)
|
Config.set_config(module, key, value)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user