Skip to content

文本消息 ​

contentType 设置为 text。

Content 字段 ​

字段类型是否必填说明
textstring是消息正文
atstring[]否被 @ 的用户 ID 列表
buttonsButton[][]否消息按钮

@ 用户 ​

at 数组按消息中 @ 用户出现的顺序排列,允许重复。消息中的用户标记必须以零宽空格 U+200B 结束。

json
{
  "recvId": "307149245",
  "recvType": "group",
  "contentType": "text",
  "content": {
    "text": "@小学不在这里哦​ 你好啊!我at你了",
    "at": ["7756242"]
  }
}

多个用户和重复 @:

json
{
  "recvId": "307149245",
  "recvType": "group",
  "contentType": "text",
  "content": {
    "text": "你好@小学云bot ​,我饿了@小学不在这里哦 ​,一起去吃饭吧@小学云bot ​。",
    "at": ["37090343", "7756242", "37090343"]
  }
}

用户名包含空格时,仍然使用零宽空格作为结束标志:

json
{
  "recvId": "307149245",
  "recvType": "group",
  "contentType": "text",
  "content": {
    "text": "@yunhu test bot ​你好啊",
    "at": ["86297657"]
  }
}