mirror of
https://github.com/nonebot/nonebot2.git
synced 2026-07-24 01:03:16 +00:00
📝 migrate admonition title syntax to Docusaurus v3 bracket form
This commit is contained in:
+1
-1
@@ -425,7 +425,7 @@ class Config(BaseSettings):
|
||||
|
||||
参考 [记录日志](https://nonebot.dev/docs/appendices/log),[loguru 日志等级](https://loguru.readthedocs.io/en/stable/api/logger.html#levels)。
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
日志等级名称应为大写,如 `INFO`。
|
||||
:::
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ nb driver install aiohttp
|
||||
pip install nonebot2[aiohttp]
|
||||
```
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
本驱动仅支持客户端连接
|
||||
:::
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ nb driver install fastapi
|
||||
pip install nonebot2[fastapi]
|
||||
```
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
本驱动仅支持服务端连接
|
||||
:::
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ nb driver install httpx
|
||||
pip install nonebot2[httpx]
|
||||
```
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
本驱动仅支持客户端 HTTP 连接
|
||||
:::
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""None 驱动适配
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
本驱动不支持任何服务器或客户端连接
|
||||
:::
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ nb driver install quart
|
||||
pip install nonebot2[quart]
|
||||
```
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
本驱动仅支持服务端连接
|
||||
:::
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ nb driver install websockets
|
||||
pip install nonebot2[websockets]
|
||||
```
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
本驱动仅支持客户端 WebSocket 连接
|
||||
:::
|
||||
|
||||
|
||||
+5
-5
@@ -412,7 +412,7 @@ def command(
|
||||
命令 `("test",)` 可以匹配: `/test` 开头的消息
|
||||
命令 `("test", "sub")` 可以匹配: `/test.sub` 开头的消息
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
命令内容与后续消息间无需空格!
|
||||
:::
|
||||
"""
|
||||
@@ -603,7 +603,7 @@ def shell_command(
|
||||
通过 {ref}`nonebot.params.ShellCommandArgs` 获取解析后的参数字典
|
||||
(例: `{"arg": "arg", "h": True}`)。
|
||||
|
||||
:::warning 警告
|
||||
:::warning[警告]
|
||||
如果参数解析失败,则通过 {ref}`nonebot.params.ShellCommandArgs`
|
||||
获取的将是 {ref}`nonebot.exception.ParserExit` 异常。
|
||||
:::
|
||||
@@ -625,7 +625,7 @@ def shell_command(
|
||||
rule = shell_command("ls", parser=parser)
|
||||
```
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
命令内容与后续消息间无需空格!
|
||||
:::
|
||||
"""
|
||||
@@ -704,11 +704,11 @@ def regex(regex: str, flags: int | re.RegexFlag = 0) -> Rule:
|
||||
regex: 正则表达式
|
||||
flags: 正则表达式标记
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
正则表达式匹配使用 search 而非 match,如需从头匹配请使用 `r"^xxx"` 来确保匹配开头
|
||||
:::
|
||||
|
||||
:::tip 提示
|
||||
:::tip[提示]
|
||||
正则表达式匹配使用 `EventMessage` 的 `str` 字符串,
|
||||
而非 `EventMessage` 的 `PlainText` 纯文本字符串
|
||||
:::
|
||||
|
||||
Reference in New Issue
Block a user