This repository was archived by the owner on Aug 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
消息元素一览
Tarrailt edited this page Nov 24, 2021
·
3 revisions
{
"type": "Source",
"id": 123456,
"time": 123456
}
名字 | 类型 | 说明 |
---|---|---|
id | int | 消息的识别号,用于引用回复(Source类型永远为chain的第一个元素) |
time | int | 时间戳 |
{
"type": "Quote",
"id": 123456,
"groupId": 123456789,
"senderId": 987654321,
"targetId": 9876543210,
"origin": [
{ "type": "Plain", text: "text" }
]
}
名字 | 类型 | 说明 |
---|---|---|
id | int | 被引用回复的原消息的messageId |
groupId | int | 被引用回复的原消息所接收的群号,当为好友消息时为0 |
senderId | int | 被引用回复的原消息的发送者的QQ号 |
targetId | int | 被引用回复的原消息的接收者者的QQ号(或群号) |
origin | MessageChain | 被引用回复的原消息的消息链对象 |
{
"type": "At",
"target": 123456,
"display": "@Mirai"
}
名字 | 类型 | 说明 |
---|---|---|
target | int | 群员QQ号 |
dispaly | str | At时显示的文字,发送消息时无效,自动使用群名片 |
{
"type": "AtAll"
}
名字 | 类型 | 说明 |
---|---|---|
- | - | - |
{
"type": "Face",
"faceId": 123,
"name": "bu"
}
名字 | 类型 | 说明 |
---|---|---|
faceId | int | QQ表情编号,可选,优先高于name |
name | str | QQ表情拼音,可选 |
{
"type": "Plain",
"text": "Mirai牛逼"
}
名字 | 类型 | 说明 |
---|---|---|
text | str | 文字消息 |
{
"type": "Image",
"imageId": "{01E9451B-70ED-EAE3-B37C-101F1EEBF5B5}.mirai", //群图片格式
//"imageId": "/f8f1ab55-bf8e-4236-b55e-955848d7069f" //好友图片格式
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"path": null,
"base64": null
}
名字 | 类型 | 说明 |
---|---|---|
imageId | str | 图片的imageId,群图片与好友图片格式不同。不为空时将忽略url属性 |
url | str | 图片的URL,发送时可作网络图片的链接;接收时为腾讯图片服务器的链接,可用于图片下载 |
path | str/Path | 图片的路径,发送本地图片,路径相对于main.py文件 |
base64 | str | 图片的 Base64 编码 |
{
"type": "FlashImage",
"imageId": "{01E9451B-70ED-EAE3-B37C-101F1EEBF5B5}.mirai", //群图片格式
//"imageId": "/f8f1ab55-bf8e-4236-b55e-955848d7069f" //好友图片格式
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"path": null,
"base64": null
}
同 Image
三个参数任选其一,出现多个参数时,按照imageId > url > path > base64的优先级
{
"type": "Voice",
"voiceId": "23C477720A37FEB6A9EE4BCCF654014F.amr",
"url": "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"path": null,
"base64": null,
"length": 1024,
}
名字 | 类型 | 说明 |
---|---|---|
voiceId | str | 语音的voiceId,不为空时将忽略url属性 |
url | str | 语音的URL,发送时可作网络语音的链接;接收时为腾讯语音服务器的链接,可用于语音下载 |
path | str | 语音的路径,发送本地语音,路径相对于main.py文件 |
base64 | str | 语音的 Base64 编码 |
length | int | 返回的语音长度, 发送消息时可以不传 |
三个参数任选其一,出现多个参数时,按照voiceId > url > path > base64的优先级
{
"type": "Xml",
"xml": "XML"
}
名字 | 类型 | 说明 |
---|---|---|
xml | str | XML文本 |
{
"type": "Json",
"json": "{}"
}
名字 | 类型 | 说明 |
---|---|---|
json | str | Json文本 |
{
"type": "App",
"content": "<>"
}
名字 | 类型 | 说明 |
---|---|---|
content | str | 内容 |
{
"type": "Poke",
"name": "SixSixSix"
}
名字 | 类型 | 说明 |
---|---|---|
name | str | 戳一戳的类型 |
{
"type": "Dice",
"value": 1
}
名字 | 类型 | 说明 |
---|---|---|
value | str | 点数 |
{
"type": "MusicShare",
"kind": "String",
"title": "String",
"summary": "String",
"jumpUrl": "String",
"pictureUrl": "String",
"musicUrl": "String",
"brief": "String"
}
名字 | 类型 | 说明 |
---|---|---|
kind | str | 类型 |
title | str | 标题 |
summary | str | 概括 |
jumpUrl | str | 跳转路径 |
pictureUrl | str | 封面路径 |
musicUrl | str | 音源路径 |
brief | str | 简介 |
{
"type": "Forward",
"nodeList": []
}
名字 | 类型 | 说明 |
---|---|---|
nodeList | ForwardNode | 消息节点 |
{
"senderId": 123,
"time": 0,
"senderName": "sender name",
"messageChain": []
}
名字 | 类型 | 说明 |
---|---|---|
senderId | int | 发送人QQ号 |
time | int | 发送时间 |
senderName | str | 显示名称 |
messageChain | MessageChain | 消息数组 |
{
"type": "File",
"id": "",
"name": "",
"size": 0
}
名字 | 类型 | 说明 |
---|---|---|
id | str | 文件识别id |
name | str | 文件名 |
size | int | 文件大小 |