Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions en/dev/star/guides/send-message.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ Similarly,
Comp.File(file="path/to/file.txt", name="file.txt") # Not supported by some platforms
```

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

**Audio Record**

```py
Expand Down
5 changes: 5 additions & 0 deletions zh/dev/star/guides/send-message.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ async def helloworld(self, event: AstrMessageEvent):
Comp.File(file="path/to/file.txt", name="file.txt") # 部分平台不支持
```

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

**语音 Record**

```py
Expand Down