mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 06:12:53 +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:
|
||||
if c := configs.configs.get(key):
|
||||
value = plugin.configs[key]
|
||||
if isinstance(c.value, (list, tuple)) or isinstance(
|
||||
c.default_value, (list, tuple)
|
||||
):
|
||||
value = value.split(",")
|
||||
# if isinstance(c.value, (list, tuple)) or isinstance(
|
||||
# c.default_value, (list, tuple)
|
||||
# ):
|
||||
# value = value.split(",")
|
||||
if c.type and value is not None:
|
||||
value = cattrs.structure(value, c.type)
|
||||
Config.set_config(module, key, value)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user