Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit fbe1b6f

Browse files
author
astrbot-docs-agent[bot]
committed
docs: update for AstrBotDevs/AstrBot#5391
1 parent dd95160 commit fbe1b6f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

en/dev/star/guides/send-message.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ Similarly,
6969
Comp.File(file="path/to/file.txt", name="file.txt") # Not supported by some platforms
7070
```
7171

72+
> [!NOTE]
73+
> - The `file` parameter supports local absolute paths, `file:///` URI format, and HTTP/HTTPS URLs.
74+
> - In the OneBot v11 (aiocqhttp) adapter, local absolute paths are automatically converted to `file://` URI format to comply with the protocol requirements.
75+
> - Cross-platform compatibility: Uses `pathlib.Path.as_uri()` to generate standard URIs, ensuring proper functionality on both Linux and Windows systems.
76+
7277
**Audio Record**
7378

7479
```py

zh/dev/star/guides/send-message.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ async def helloworld(self, event: AstrMessageEvent):
6969
Comp.File(file="path/to/file.txt", name="file.txt") # 部分平台不支持
7070
```
7171

72+
> [!NOTE]
73+
> - `file` 参数支持本地绝对路径、`file:///` URI 格式以及 HTTP/HTTPS URL。
74+
> - 在 OneBot v11 (aiocqhttp) 适配器中,本地绝对路径会自动转换为 `file://` URI 格式以符合协议要求。
75+
> - 跨平台兼容性:使用 `pathlib.Path.as_uri()` 生成标准 URI,确保在 Linux 和 Windows 系统下均能正常工作。
76+
7277
**语音 Record**
7378

7479
```py

0 commit comments

Comments
 (0)