mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-09-01 01:26:46 +00:00
📝 Update changelog
Some checks failed
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.10) (push) Failing after 3s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.12) (push) Failing after 3s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.10) (push) Failing after 3s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.11) (push) Failing after 3s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.9) (push) Failing after 3s
Pyright Lint / Pyright Lint (pydantic-v1) (push) Failing after 3s
Ruff Lint / Ruff Lint (push) Failing after 3s
Site Deploy / publish (push) Failing after 3s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.11) (push) Failing after 1m34s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.9) (push) Failing after 3m3s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.12) (push) Failing after 3m31s
Pyright Lint / Pyright Lint (pydantic-v2) (push) Failing after 3m59s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.9) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.11) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.12) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.10) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.10) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.11) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.12) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.9) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.10) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.11) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.12) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.9) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.10) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.11) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.12) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.9) (push) Has been cancelled
Some checks failed
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.10) (push) Failing after 3s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.12) (push) Failing after 3s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.10) (push) Failing after 3s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.11) (push) Failing after 3s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.9) (push) Failing after 3s
Pyright Lint / Pyright Lint (pydantic-v1) (push) Failing after 3s
Ruff Lint / Ruff Lint (push) Failing after 3s
Site Deploy / publish (push) Failing after 3s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.11) (push) Failing after 1m34s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.9) (push) Failing after 3m3s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.12) (push) Failing after 3m31s
Pyright Lint / Pyright Lint (pydantic-v2) (push) Failing after 3m59s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.9) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.11) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.12) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.10) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.10) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.11) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.12) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.9) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.10) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.11) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.12) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.9) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.10) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.11) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.12) (push) Has been cancelled
Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.9) (push) Has been cancelled
This commit is contained in:
@ -14,11 +14,9 @@ description: nonebot.plugin.load 模块
|
||||
- **说明:** 加载单个插件,可以是本地插件或是通过 `pip` 安装的插件。
|
||||
|
||||
- **参数**
|
||||
|
||||
- `module_path` (str | Path): 插件名称 `path.to.your.plugin` 或插件路径 `pathlib.Path(path/to/your/plugin)`
|
||||
|
||||
- **返回**
|
||||
|
||||
- [Plugin](model.md#Plugin) | None
|
||||
|
||||
## _def_ `load_plugins(*plugin_dir)` {#load-plugins}
|
||||
@ -26,11 +24,9 @@ description: nonebot.plugin.load 模块
|
||||
- **说明:** 导入文件夹下多个插件,以 `_` 开头的插件不会被导入!
|
||||
|
||||
- **参数**
|
||||
|
||||
- `*plugin_dir` (str): 文件夹路径
|
||||
|
||||
- **返回**
|
||||
|
||||
- set[[Plugin](model.md#Plugin)]
|
||||
|
||||
## _def_ `load_all_plugins(module_path, plugin_dir)` {#load-all-plugins}
|
||||
@ -38,13 +34,11 @@ description: nonebot.plugin.load 模块
|
||||
- **说明:** 导入指定列表中的插件以及指定目录下多个插件,以 `_` 开头的插件不会被导入!
|
||||
|
||||
- **参数**
|
||||
|
||||
- `module_path` (Iterable[str]): 指定插件集合
|
||||
|
||||
- `plugin_dir` (Iterable[str]): 指定文件夹路径集合
|
||||
|
||||
- **返回**
|
||||
|
||||
- set[[Plugin](model.md#Plugin)]
|
||||
|
||||
## _def_ `load_from_json(file_path, encoding="utf-8")` {#load-from-json}
|
||||
@ -52,13 +46,11 @@ description: nonebot.plugin.load 模块
|
||||
- **说明:** 导入指定 json 文件中的 `plugins` 以及 `plugin_dirs` 下多个插件。 以 `_` 开头的插件不会被导入!
|
||||
|
||||
- **参数**
|
||||
|
||||
- `file_path` (str): 指定 json 文件路径
|
||||
|
||||
- `encoding` (str): 指定 json 文件编码
|
||||
|
||||
- **返回**
|
||||
|
||||
- set[[Plugin](model.md#Plugin)]
|
||||
|
||||
- **用法**
|
||||
@ -79,13 +71,11 @@ description: nonebot.plugin.load 模块
|
||||
- **说明:** 导入指定 toml 文件 `[tool.nonebot]` 中的 `plugins` 以及 `plugin_dirs` 下多个插件。 以 `_` 开头的插件不会被导入!
|
||||
|
||||
- **参数**
|
||||
|
||||
- `file_path` (str): 指定 toml 文件路径
|
||||
|
||||
- `encoding` (str): 指定 toml 文件编码
|
||||
|
||||
- **返回**
|
||||
|
||||
- set[[Plugin](model.md#Plugin)]
|
||||
|
||||
- **用法**
|
||||
@ -105,11 +95,9 @@ description: nonebot.plugin.load 模块
|
||||
- **说明:** 导入 NoneBot 内置插件。
|
||||
|
||||
- **参数**
|
||||
|
||||
- `name` (str): 插件名称
|
||||
|
||||
- **返回**
|
||||
|
||||
- [Plugin](model.md#Plugin) | None
|
||||
|
||||
## _def_ `load_builtin_plugins(*plugins)` {#load-builtin-plugins}
|
||||
@ -117,11 +105,9 @@ description: nonebot.plugin.load 模块
|
||||
- **说明:** 导入多个 NoneBot 内置插件。
|
||||
|
||||
- **参数**
|
||||
|
||||
- `*plugins` (str): 插件名称列表
|
||||
|
||||
- **返回**
|
||||
|
||||
- set[[Plugin](model.md#Plugin)]
|
||||
|
||||
## _def_ `require(name)` {#require}
|
||||
@ -129,15 +115,12 @@ description: nonebot.plugin.load 模块
|
||||
- **说明:** 声明依赖插件。
|
||||
|
||||
- **参数**
|
||||
|
||||
- `name` (str): 插件模块名或插件标识符,仅在已声明插件的情况下可使用标识符。
|
||||
|
||||
- **返回**
|
||||
|
||||
- ModuleType
|
||||
|
||||
- **异常**
|
||||
|
||||
- RuntimeError: 插件无法加载
|
||||
|
||||
## _def_ `inherit_supported_adapters(*names)` {#inherit-supported-adapters}
|
||||
@ -149,15 +132,12 @@ description: nonebot.plugin.load 模块
|
||||
如果传入了多个插件名称,返回值会自动取交集。
|
||||
|
||||
- **参数**
|
||||
|
||||
- `*names` (str): 插件名称列表。
|
||||
|
||||
- **返回**
|
||||
|
||||
- set[str] | None
|
||||
|
||||
- **异常**
|
||||
|
||||
- RuntimeError: 插件未加载
|
||||
|
||||
- ValueError: 插件缺少元数据
|
||||
|
Reference in New Issue
Block a user