1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

update doc.

This commit is contained in:
Mrs4s 2021-01-24 15:15:09 +08:00
parent 8532c4ecbe
commit a2a0b4c86f
2 changed files with 36 additions and 1 deletions

View File

@ -422,8 +422,8 @@ func (bot *CQBot) otherClientStatusChangedEvent(c *client.QQClient, e *client.Ot
bot.dispatchEventMessage(MSG{
"post_type": "notice",
"notice_type": "client_status",
"online": e.Online,
"client": MSG{
"online": e.Online,
"app_id": e.Client.AppId,
"device_name": e.Client.DeviceName,
"device_kind": e.Client.DeviceKind,

View File

@ -850,6 +850,30 @@ JSON数组:
> 不提供起始序号将默认获取最新的消息
### 获取当前账号在线客户端列表
终结点:`/get_online_clients`
**参数**
| 字段 | 类型 | 说明 |
| ---------- | ------ | ------------------------- |
| `no_cache` | bool | 是否无视缓存 |
**响应数据**
| 字段 | 类型 | 说明 |
| ---------- | ---------- | ------------ |
| `clients` | []Device | 在线客户端列表 |
**Device**
| 字段 | 类型 | 说明 |
| ---------- | ---------- | ------------ |
| `app_id` | int64 | 客户端ID |
| `device_name` | string | 设备名称 |
| `device_kind` | string | 设备类型 |
### 获取用户VIP信息
终结点:`/_get_vip_info`
@ -1013,3 +1037,14 @@ JSON数组:
| `name` | string | | 文件名 |
| `size` | int64 | | 文件大小 |
| `url` | string | | 下载链接 |
### 其他客户端在线状态变更
**上报数据**
| 字段 | 类型 | 可能的值 | 说明 |
| ------------- | ------ | -------------- | -------- |
| `post_type` | string | `notice` | 上报类型 |
| `notice_type` | string | `client_status` | 消息类型 |
| `client` | Device | | 客户端信息 |
| `online` | bool | | 当前是否在线 |