forked from mttu-developers/konabot
修复断言逻辑
This commit is contained in:
@ -8,9 +8,12 @@ nonebot.load_plugins("konabot/plugins")
|
|||||||
|
|
||||||
plugins = nonebot.get_loaded_plugins()
|
plugins = nonebot.get_loaded_plugins()
|
||||||
len_requires = len(
|
len_requires = len(
|
||||||
[f for f in (
|
[
|
||||||
Path(__file__).parent.parent / "konabot" / "plugins"
|
f
|
||||||
).iterdir() if f.is_dir() and (f / "__init__.py").exists()]
|
for f in (Path(__file__).parent.parent / "konabot" / "plugins").iterdir()
|
||||||
|
if (f.is_dir() and (f / "__init__.py").exists())
|
||||||
|
or ((not f.is_dir()) and f.suffix == ".py")
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
plugins = [p for p in plugins if p.module.__name__.startswith("konabot.plugins")]
|
plugins = [p for p in plugins if p.module.__name__.startswith("konabot.plugins")]
|
||||||
|
|||||||
Reference in New Issue
Block a user