mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 00:01:27 +00:00
⚗️ add load all plugin function
This commit is contained in:
@ -52,6 +52,9 @@ sidebarDepth: 0
|
||||
* `load_plugins` => `nonebot.plugin.load_plugins`
|
||||
|
||||
|
||||
* `load_all_plugins` => `nonebot.plugin.load_all_plugins`
|
||||
|
||||
|
||||
* `load_builtin_plugins` => `nonebot.plugin.load_builtin_plugins`
|
||||
|
||||
|
||||
|
@ -1267,7 +1267,7 @@ def something_else():
|
||||
|
||||
* **说明**
|
||||
|
||||
使用 `importlib` 加载单个插件,可以是本地插件或是通过 `pip` 安装的插件。
|
||||
使用 `PluginManager` 加载单个插件,可以是本地插件或是通过 `pip` 安装的插件。
|
||||
|
||||
|
||||
|
||||
@ -1308,6 +1308,32 @@ def something_else():
|
||||
|
||||
|
||||
|
||||
## `load_all_plugins(module_path, plugin_dir)`
|
||||
|
||||
|
||||
* **说明**
|
||||
|
||||
导入指定列表中的插件以及指定目录下多个插件,以 `_` 开头的插件不会被导入!
|
||||
|
||||
|
||||
|
||||
* **参数**
|
||||
|
||||
|
||||
* `module_path: Set[str]`: 指定插件集合
|
||||
|
||||
|
||||
* `plugin_dir: Set[str]`: 指定插件路径集合
|
||||
|
||||
|
||||
|
||||
* **返回**
|
||||
|
||||
|
||||
* `Set[Plugin]`
|
||||
|
||||
|
||||
|
||||
## `load_builtin_plugins(name='echo')`
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user