mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-28 08:41:29 +00:00
📝 Update changelog
Some checks failed
Ruff Lint / Ruff Lint (push) Successful in 18s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.11) (push) Failing after 1m39s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.11) (push) Failing after 1m48s
Pyright Lint / Pyright Lint (pydantic-v2) (push) Failing after 1m20s
Site Deploy / publish (push) Failing after 11m5s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.9) (push) Failing after 12m1s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.12) (push) Failing after 12m2s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.10) (push) Failing after 12m5s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.9) (push) Failing after 12m6s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.12) (push) Failing after 12m10s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.10) (push) Failing after 17m50s
Pyright Lint / Pyright Lint (pydantic-v1) (push) Failing after 18m23s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.10) (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.9) (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
Ruff Lint / Ruff Lint (push) Successful in 18s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.11) (push) Failing after 1m39s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.11) (push) Failing after 1m48s
Pyright Lint / Pyright Lint (pydantic-v2) (push) Failing after 1m20s
Site Deploy / publish (push) Failing after 11m5s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.9) (push) Failing after 12m1s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.12) (push) Failing after 12m2s
Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.10) (push) Failing after 12m5s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.9) (push) Failing after 12m6s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.12) (push) Failing after 12m10s
Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.10) (push) Failing after 17m50s
Pyright Lint / Pyright Lint (pydantic-v1) (push) Failing after 18m23s
Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.10) (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.9) (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:
@ -61,7 +61,6 @@ async def _(name: str, target: Match[tuple[At, ...]]):
|
||||
]}
|
||||
/>
|
||||
|
||||
|
||||
## 声明
|
||||
|
||||
`on_alconna` 的参数如下:
|
||||
@ -148,6 +147,7 @@ async def handle(
|
||||
```
|
||||
|
||||
`AlconnaMatcher` 的依赖注入拓展支持以下情况:
|
||||
|
||||
- `xxx: CommandResult`
|
||||
- `xxx: Arparma`:命令的[解析结果](./command.md#解析结果)
|
||||
- `xxx: Duplication`:命令的解析结果的 [`Duplication`](./command.md#Duplication)
|
||||
@ -260,7 +260,6 @@ async def handle_list(): ...
|
||||
async def handle_add_admin(): ...
|
||||
```
|
||||
|
||||
|
||||
### `dispatch` 方法
|
||||
|
||||
此外,使用 `.dispatch` 还能像 `CommandGroup` 一样为每个分发设置独立的 matcher:
|
||||
@ -297,7 +296,6 @@ async def handle_add_admin(target: Query[tuple[At, ...]] = Query("~target")):
|
||||
|
||||
:::
|
||||
|
||||
|
||||
### `got_path` 方法
|
||||
|
||||
另外,`AlconnaMatcher` 有类似于 [`got`](../../appendices/session-control.mdx#got) 的 `got_path` 与配套的 `get_path_arg`, `set_path_arg`:
|
||||
@ -324,7 +322,6 @@ async def tt(target: Union[str, At]):
|
||||
|
||||
`got_path` 中可以使用依赖注入函数 `AlconnaArg`, 类似于 [`Arg`](../../advanced/dependency.mdx#arg).
|
||||
|
||||
|
||||
### `prompt` 方法
|
||||
|
||||
基于 [`Waiter`](https://github.com/RF-Tar-Railt/nonebot-plugin-waiter) 插件,`AlconnaMatcher` 提供了 `prompt` 方法来实现更灵活的交互式提示。
|
||||
@ -426,6 +423,7 @@ def test(
|
||||
prefix: bool = True
|
||||
): ...
|
||||
```
|
||||
|
||||
- `message`: 测试的消息
|
||||
- `expected`: 预期的解析结果,若为 None 则表示只测试是否匹配
|
||||
- `prefix`: 是否使用命令前缀,默认为 True
|
||||
|
Reference in New Issue
Block a user