OneBot 通信协议,定义消息收发的公共数据结构
Project description
onebot-protocol
OneBot 通信协议,定义消息收发的公共数据结构。基于OneBot 11标准,使用 Pydantic 提供类型安全的模型定义。
特性
- 完整的消息段(Message Segment)类型:文本、提及、图片、语音、视频、文件、位置、回复等
- 支持 discriminated union,根据
type字段自动解析消息类型
支持的消息类型
| 类型 | 说明 |
|---|---|
text |
纯文本 |
mention |
@某人 |
mention_all |
@所有人 |
image |
图片 |
voice |
语音 |
audio |
音频 |
video |
视频 |
file |
文件 |
location |
位置 |
reply |
回复 |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
onebot_protocol-0.1.0.tar.gz
(2.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onebot_protocol-0.1.0.tar.gz.
File metadata
- Download URL: onebot_protocol-0.1.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b3c4e2942d027a816c951ab41f4c52145091acb893bb57b0aa7623082c07c82
|
|
| MD5 |
1bf047e270e5940e44a9171536d696f2
|
|
| BLAKE2b-256 |
5ccb12d2fbe0794fbf203ab2914e113399b192f6db781685f355d3f35a198875
|
File details
Details for the file onebot_protocol-0.1.0-py3-none-any.whl.
File metadata
- Download URL: onebot_protocol-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f367cee7cf4eab6393ce3c55bdb961c797a43404f1bb9aeaf70b871fecee41b
|
|
| MD5 |
ce47c17212a77fb28c55c4af8b7b8671
|
|
| BLAKE2b-256 |
7d4fa3b9a4e5134c1fed5f84f30cc053a1bd0be5bf49ced879519bfab2151c42
|