nonebot2/tests/plugins/nested/__init__.py

14 lines
337 B
Python
Raw Normal View History

2022-05-26 16:35:47 +08:00
from pathlib import Path
import nonebot
from nonebot.plugin import PluginManager, _managers
2022-05-26 16:35:47 +08:00
manager = PluginManager(
search_path=[str((Path(__file__).parent / "plugins").resolve())]
)
_managers.append(manager)
# test load nested plugin with require
manager.load_plugin("nested_subplugin")
manager.load_plugin("nested_subplugin2")