1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00

update docs

This commit is contained in:
wdvxdr 2021-02-02 23:59:00 +08:00
parent 89d466d3e1
commit 7da1918c0c
No known key found for this signature in database
GPG Key ID: 55FF1414A69CEBA6
2 changed files with 73 additions and 5 deletions

View File

@ -1026,10 +1026,9 @@ func (bot *CQBot) CQGetEssenceMessageList(groupCode int64) MSG {
"sender_time": m.SenderTime, "sender_time": m.SenderTime,
"operator_time": m.AddDigestTime, "operator_time": m.AddDigestTime,
"operator_nick": m.AddDigestNick, "operator_nick": m.AddDigestNick,
"group_code": groupCode,
} }
msg["sender_uin"], _ = strconv.ParseUint(m.SenderUin, 10, 64) msg["sender_id"], _ = strconv.ParseUint(m.SenderUin, 10, 64)
msg["operator_uin"], _ = strconv.ParseUint(m.AddDigestUin, 10, 64) msg["operator_id"], _ = strconv.ParseUint(m.AddDigestUin, 10, 64)
msg["message_id"] = ToGlobalId(groupCode, int32(m.MessageID)) msg["message_id"] = ToGlobalId(groupCode, int32(m.MessageID))
list = append(list, msg) list = append(list, msg)
} }

View File

@ -39,6 +39,9 @@
- [获取群子目录文件列表](#设置群名) - [获取群子目录文件列表](#设置群名)
- [获取用户VIP信息](#获取用户VIP信息) - [获取用户VIP信息](#获取用户VIP信息)
- [发送群公告](#发送群公告) - [发送群公告](#发送群公告)
- [设置精华消息](#设置精华消息)
- [移出精华消息](#移出精华消息)
- [获取精华消息列表](#获取精华消息列表)
- [重载事件过滤器](#重载事件过滤器) - [重载事件过滤器](#重载事件过滤器)
##### 事件 ##### 事件
@ -50,6 +53,7 @@
- [群成员荣誉变更提示](#群成员荣誉变更提示) - [群成员荣誉变更提示](#群成员荣誉变更提示)
- [群成员名片更新](#群成员名片更新) - [群成员名片更新](#群成员名片更新)
- [接收到离线文件](#接收到离线文件) - [接收到离线文件](#接收到离线文件)
- [群精华消息](#精华消息)
</p> </p>
</details> </details>
@ -620,11 +624,63 @@ Type: `tts`
| -------- | -------- | ---- | | -------- | -------- | ---- |
| `slices` | string[] | 词组 | | `slices` | string[] | 词组 |
### 设置精华消息
终结点: `/set_essence_msg`
**参数**
| 字段 | 类型 | 说明 |
| --------- | ------ | ---- |
| `message_id` | int32 | 消息ID |
**响应数据**
### 移出精华消息
终结点: `/delete_essence_msg`
**参数**
| 字段 | 类型 | 说明 |
| --------- | ------ | ---- |
| `message_id` | int32 | 消息ID |
**响应数据**
### 获取精华消息列表
终结点: `/get_essence_msg_list`
**参数**
| 字段 | 类型 | 说明 |
| --------- | ------ | ---- |
| `group_id` | int64 | 群号 |
**响应数据**
响应内容为 JSON 数组,每个元素如下:
| 字段名 | 数据类型 | 说明 |
| ----- | ------- | --- |
| `sender_id` |int64 | 发送者QQ 号 |
| `sender_nick` | string | 发送者昵称 |
| `sender_time` | int64 | 消息发送时间 |
| `operator_id` |int64 | 发送者QQ 号 |
| `operator_nick` | string | 发送者昵称 |
| `operator_time` | int64 | 消息发送时间|
| `message_id` | int32 | 消息ID |
### 图片OCR ### 图片OCR
> 注意: 目前图片OCR接口仅支持接受的图片 > 注意: 目前图片OCR接口仅支持接受的图片
终结点: `/.ocr_image` 终结点: `/ocr_image`
**参数** **参数**
@ -1096,3 +1152,16 @@ JSON数组:
| `notice_type` | string | `client_status` | 消息类型 | | `notice_type` | string | `client_status` | 消息类型 |
| `client` | Device | | 客户端信息 | | `client` | Device | | 客户端信息 |
| `online` | bool | | 当前是否在线 | | `online` | bool | | 当前是否在线 |
### 精华消息
**上报数据**
| 字段 | 类型 | 可能的值 | 说明 |
| ------------- | ------ | -------------- | -------- |
| `post_type` | string | `notice` | 上报类型 |
| `notice_type` | string | `essence` | 消息类型 |
| `sub_type` | string | `add`,`delete` | 添加为`add`,移出为`delete` |
| `sender_id` | int64 | | 消息发送者ID |
| `operator_id` | int64 | | 操作者ID |
| `message_id` | int32 | | 消息ID |