1
0
forked from bot/app

🚸 添加发布工作流

This commit is contained in:
远野千束 2024-08-18 04:34:54 +08:00
parent 502ccb46bb
commit 8ba50b7bd6

View File

@ -69,6 +69,9 @@ def load_plugins(*plugin_dir: str) -> set[Plugin]:
plugins = set()
for dir_path in plugin_dir:
# 遍历每一个文件夹下的py文件和包含__init__.py的文件夹不递归
if not os.path.exists(dir_path):
logger.warning(f"Plugins dir '{dir_path}' does not exist.")
continue
for f in os.listdir(dir_path):
path = Path(os.path.join(dir_path, f))