From 6a20a86e492d5dd1aeafd817ac508330e927c2fd Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Sat, 17 Oct 2020 17:13:27 +0800 Subject: [PATCH 1/3] update doc. --- docs/cqhttp.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/cqhttp.md b/docs/cqhttp.md index 67be4e1..bfc16c7 100644 --- a/docs/cqhttp.md +++ b/docs/cqhttp.md @@ -558,4 +558,23 @@ Type: `tts` | `card_new` | int64 | | 新名片 | | `card_old` | int64 | | 旧名片 | -> PS: 当名片为空时 `card_xx` 字段为空字符串, 并不是昵称 \ No newline at end of file +> PS: 当名片为空时 `card_xx` 字段为空字符串, 并不是昵称 + +#### 接收到离线文件 + +**上报数据** + +| 字段 | 类型 | 可能的值 | 说明 | +| ------------- | ------ | -------------- | -------------- | +| `post_type` | string | `notice` | 上报类型 | +| `notice_type` | string | `offline_file` | 消息类型 | +| `user_id` | int64 | | 发送者id | +| `file` | object | | 文件数据 | + +**file object** + +| 字段 | 类型 | 可能的值 | 说明 | +| ------------- | ------ | -------------- | -------------- | +| `name` | string | | 文件名 | +| `size` | int64 | | 文件大小 | +| `url` | string | | 下载链接 | \ No newline at end of file From c35f46e0330cd991f422444f3c7f4bfd9b94a869 Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Sun, 18 Oct 2020 22:40:41 +0800 Subject: [PATCH 2/3] update doc. --- docs/cqhttp.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/cqhttp.md b/docs/cqhttp.md index bfc16c7..9584ed1 100644 --- a/docs/cqhttp.md +++ b/docs/cqhttp.md @@ -472,6 +472,35 @@ Type: `tts` | ---------- | ----------------- | -------- | | `slices` | string[] | 词组 | +### 图片OCR + +> 注意: 目前图片OCR接口仅支持接受的图片 + +终结点: `/.ocr_image` + +**参数** + + | 字段 | 类型 | 说明 | + | ------------ | ------ | ------ | + | `image` | string | 图片ID | + +**响应数据** + + | 字段 | 类型 | 说明 | + | ---------- | ----------------- | -------- | + | `texts` | TextDetection[] | OCR结果 | + | `language` | string | 语言 | + +**TextDetection** + + | 字段 | 类型 | 说明 | + | ---------- | ----------------- | -------- | + | `text` | string | 文本 | + | `confidence`| int32 | 置信度 | + | `coordinates` | vector2 | 坐标 | + + + ## 事件 #### 群消息撤回 From fffed72d4430d368bd15f3f0a0c0ef7ad89e413d Mon Sep 17 00:00:00 2001 From: Shigma <33423008+Shigma@users.noreply.github.com> Date: Sun, 18 Oct 2020 23:50:13 +0800 Subject: [PATCH 3/3] Update api.go --- coolq/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coolq/api.go b/coolq/api.go index 21f8516..c6b2b55 100644 --- a/coolq/api.go +++ b/coolq/api.go @@ -662,7 +662,7 @@ func (bot *CQBot) CQGetMessage(messageId int32) MSG { "nickname": sender.Nickname, }, "time": msg["time"], - "content": msg["message"], + "message": msg["message"], }) }