Skip to Content
🎉 Milky 1.1 已发布! 🎉
结构体发送消息段

发送消息段 (OutgoingSegment)

字段名类型描述
typestring类型区分字段
dataobjecttype 有关

data 在不同 type 下的具体类型如下:

text 文本消息段

字段名类型描述
textstring文本内容

mention 提及消息段

字段名类型描述
user_idint64提及的 QQ 号

mention_all 提及全体消息段

此结构体无字段。

face 表情消息段

字段名类型描述
face_idstring表情 ID
is_largeboolean是否为超级表情,默认值:false

reply 回复消息段

字段名类型描述
message_seqint64被引用的消息序列号

image 图片消息段

字段名类型描述
uristring文件 URI,支持 file:// http(s):// base64:// 三种格式
sub_typeenum图片类型,可能值:normal sticker,默认值:normal
summarystring?图片预览文本

record 语音消息段

字段名类型描述
uristring文件 URI,支持 file:// http(s):// base64:// 三种格式

video 视频消息段

字段名类型描述
uristring文件 URI,支持 file:// http(s):// base64:// 三种格式
thumb_uristring?封面图片 URI

forward 合并转发消息段

字段名类型描述
messagesOutgoingForwardedMessage[]合并转发消息内容
titlestring?合并转发标题
previewstring[]?合并转发预览文本,若提供,至少 1 条,至多 4 条
summarystring?合并转发摘要

light_app 小程序消息段

字段名类型描述
json_payloadstring小程序 JSON 数据