nonebot2/tests/plugins/nested/__init__.py

13 lines
352 B
Python
Raw Permalink Normal View History

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