Skip to content

Commit

Permalink
update doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrs4s committed Jan 24, 2021
1 parent 8532c4e commit a2a0b4c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion coolq/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
35 changes: 35 additions & 0 deletions docs/cqhttp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -1013,3 +1037,14 @@ JSON数组:
| `name` | string | | 文件名 |
| `size` | int64 | | 文件大小 |
| `url` | string | | 下载链接 |

### 其他客户端在线状态变更

**上报数据**

| 字段 | 类型 | 可能的值 | 说明 |
| ------------- | ------ | -------------- | -------- |
| `post_type` | string | `notice` | 上报类型 |
| `notice_type` | string | `client_status` | 消息类型 |
| `client` | Device | | 客户端信息 |
| `online` | bool | | 当前是否在线 |

0 comments on commit a2a0b4c

Please sign in to comment.