mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
Merge branch 'master' into dev
This commit is contained in:
commit
1c965ab9ac
@ -662,7 +662,7 @@ func (bot *CQBot) CQGetMessage(messageId int32) MSG {
|
||||
"nickname": sender.Nickname,
|
||||
},
|
||||
"time": msg["time"],
|
||||
"content": msg["message"],
|
||||
"message": msg["message"],
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -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 | 坐标 |
|
||||
|
||||
|
||||
|
||||
## 事件
|
||||
|
||||
#### 群消息撤回
|
||||
@ -558,4 +587,23 @@ Type: `tts`
|
||||
| `card_new` | int64 | | 新名片 |
|
||||
| `card_old` | int64 | | 旧名片 |
|
||||
|
||||
> PS: 当名片为空时 `card_xx` 字段为空字符串, 并不是昵称
|
||||
> 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 | | 下载链接 |
|
Loading…
x
Reference in New Issue
Block a user