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

doc update.

This commit is contained in:
Mrs4s 2020-09-12 19:44:14 +08:00
parent a1a3e26b0b
commit e87de2f6b3
6 changed files with 75 additions and 4 deletions

View File

@ -80,13 +80,14 @@
| ------------------------------------------------------------ | | ------------------------------------------------------------ |
| [私聊信息](https://cqhttp.cc/docs/4.15/#/Post?id=私聊消息) | | [私聊信息](https://cqhttp.cc/docs/4.15/#/Post?id=私聊消息) |
| [群消息](https://cqhttp.cc/docs/4.15/#/Post?id=群消息) | | [群消息](https://cqhttp.cc/docs/4.15/#/Post?id=群消息) |
| [群消息撤回(拓展Event)](docs/cqhttp.md#群消息撤回) | | [群消息撤回(拓展Event)](docs/cqhttp.md#群消息撤回) |
| [好友消息撤回(拓展Event)](docs/cqhttp.md#好友消息撤回) | | [好友消息撤回(拓展Event)](docs/cqhttp.md#好友消息撤回) |
| 群内提示事件(拓展Event) |
| [群管理员变动](https://cqhttp.cc/docs/4.15/#/Post?id=群管理员变动) | | [群管理员变动](https://cqhttp.cc/docs/4.15/#/Post?id=群管理员变动) |
| [群成员减少](https://cqhttp.cc/docs/4.15/#/Post?id=群成员减少) | | [群成员减少](https://cqhttp.cc/docs/4.15/#/Post?id=群成员减少) |
| [群成员增加](https://cqhttp.cc/docs/4.15/#/Post?id=群成员增加) | | [群成员增加](https://cqhttp.cc/docs/4.15/#/Post?id=群成员增加) |
| [群禁言](https://cqhttp.cc/docs/4.15/#/Post?id=群禁言) | | [群禁言](https://cqhttp.cc/docs/4.15/#/Post?id=群禁言) |
| [群文件上传](https://cqhttp.cc/docs/4.15/#/Post?id=群文件上传)| | [群文件上传](https://cqhttp.cc/docs/4.15/#/Post?id=群文件上传) |
| [加好友请求](https://cqhttp.cc/docs/4.15/#/Post?id=加好友请求) | | [加好友请求](https://cqhttp.cc/docs/4.15/#/Post?id=加好友请求) |
| [加群请求/邀请](https://cqhttp.cc/docs/4.15/#/Post?id=加群请求/邀请) | | [加群请求/邀请](https://cqhttp.cc/docs/4.15/#/Post?id=加群请求/邀请) |

View File

@ -90,3 +90,28 @@ go-cqhttp 支持导入CQHTTP的配置文件, 具体步骤为:
> 注2: 分片发送为原酷Q发送长消息的老方案, 发送速度更优/兼容性更好,但在有发言频率限制的群里,可能无法发送。关闭后将优先使用新方案, 能发送更长的消息, 但发送速度更慢,在部分老客户端将无法解析. > 注2: 分片发送为原酷Q发送长消息的老方案, 发送速度更优/兼容性更好,但在有发言频率限制的群里,可能无法发送。关闭后将优先使用新方案, 能发送更长的消息, 但发送速度更慢,在部分老客户端将无法解析.
> 注3关闭心跳服务可能引起断线请谨慎关闭 > 注3关闭心跳服务可能引起断线请谨慎关闭
## 设备信息
默认生成的设备信息如下所示:
``` json
{
"protocol": 0,
"display": "xxx",
"finger_print": "xxx",
"boot_id": "xxx",
"proc_version": "xxx",
"imei": "xxx"
}
```
在大部分情况下 我们只需要关心 `protocol` 字段:
| 值 | 类型 | 限制 |
| ---- | ------------- | ----------------------------------------------------- |
| 0 | Android Pad | 无法接收 `group_notify` 事件、无法接收口令红包 |
| 1 | Android Phone | 无 |
| 2 | Android Watch | 除了 `Android Pad` 有的限制外还包括: 无法接收撤回消息 |
> 注意, 根据协议的不同, 各类消息有所限制

View File

@ -18,6 +18,20 @@ Type : `reply`
示例: `[CQ:reply,id=123456]` 示例: `[CQ:reply,id=123456]`
### 红包
Type: `redbag`
范围: **接收**
参数:
| 参数名 | 类型 | 说明 |
| ------ | ------ | ----------- |
| title | string | 祝福语/口令 |
示例: `[CQ:redbag,title=恭喜发财]`
### 合并转发 ### 合并转发
Type: `forward` Type: `forward`
@ -362,3 +376,30 @@ Type: `cardimage`
| `user_id` | int64 | | 好友id | | `user_id` | int64 | | 好友id |
| `message_id` | int64 | | 被撤回的消息id | | `message_id` | int64 | | 被撤回的消息id |
#### 群内戳一戳
> 注意:此事件无法在平板和手表协议上触发
**上报数据**
| 字段 | 类型 | 可能的值 | 说明 |
| ------------- | ------ | -------------- | -------------- |
| `post_type` | string | `notice` | 上报类型 |
| `notice_type` | string | `notify` | 消息类型 |
| `notify_type` | string | `poke` | 提示类型 |
| `user_id` | int64 | | 发送者id |
| `receiver_id` | int64 | | 被戳者id |
#### 群红包运气王提示
> 注意:此事件无法在平板和手表协议上触发
**上报数据**
| 字段 | 类型 | 可能的值 | 说明 |
| ------------- | ------ | -------------- | -------------- |
| `post_type` | string | `notice` | 上报类型 |
| `notice_type` | string | `notify` | 消息类型 |
| `notify_type` | string | `lucky_king` | 提示类型 |
| `user_id` | int64 | | 红包发送者id |
| `lucky_king_id` | int64 | | 运气王id |

View File

@ -7,6 +7,7 @@ go-cqhttp 默认生成的文件树如下所示:
├── go-cqhttp ├── go-cqhttp
├── config.json ├── config.json
├── device.json ├── device.json
├── servers.bin
├── logs ├── logs
│ └── xx-xx-xx.log │ └── xx-xx-xx.log
└── data └── data
@ -20,6 +21,7 @@ go-cqhttp 默认生成的文件树如下所示:
| go-cqhttp | go-cqhttp可执行文件 | | go-cqhttp | go-cqhttp可执行文件 |
| config.json | 运行配置文件 | | config.json | 运行配置文件 |
| device.json | 虚拟设备配置文件 | | device.json | 虚拟设备配置文件 |
| servers.bin | 储存QQ服务器地址 |
| logs | 日志存放目录 | | logs | 日志存放目录 |
| data | 数据目录 | | data | 数据目录 |
| data/images | 图片缓存目录 | | data/images | 图片缓存目录 |

2
go.mod
View File

@ -3,7 +3,7 @@ module github.com/Mrs4s/go-cqhttp
go 1.14 go 1.14
require ( require (
github.com/Mrs4s/MiraiGo v0.0.0-20200912102543-d8eaf11f598b github.com/Mrs4s/MiraiGo v0.0.0-20200912113251-498ec93183e0
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect
github.com/gin-gonic/gin v1.6.3 github.com/gin-gonic/gin v1.6.3
github.com/go-playground/validator/v10 v10.3.0 // indirect github.com/go-playground/validator/v10 v10.3.0 // indirect

2
go.sum
View File

@ -2,6 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Mrs4s/MiraiGo v0.0.0-20200912102543-d8eaf11f598b h1:3uUSB/3FzPrcUmp4m+QO+F/U/oNf3n82KQqp+468fvs= github.com/Mrs4s/MiraiGo v0.0.0-20200912102543-d8eaf11f598b h1:3uUSB/3FzPrcUmp4m+QO+F/U/oNf3n82KQqp+468fvs=
github.com/Mrs4s/MiraiGo v0.0.0-20200912102543-d8eaf11f598b/go.mod h1:cwYPI2uq6nxNbx0nA6YuAKF1V5szSs6FPlGVLQvRUlo= github.com/Mrs4s/MiraiGo v0.0.0-20200912102543-d8eaf11f598b/go.mod h1:cwYPI2uq6nxNbx0nA6YuAKF1V5szSs6FPlGVLQvRUlo=
github.com/Mrs4s/MiraiGo v0.0.0-20200912113251-498ec93183e0 h1:c6LzgaZJRRLSnCTwOGwcPHJTzDHjIxRrVcV3NL+G4f0=
github.com/Mrs4s/MiraiGo v0.0.0-20200912113251-498ec93183e0/go.mod h1:cwYPI2uq6nxNbx0nA6YuAKF1V5szSs6FPlGVLQvRUlo=
github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0= github.com/bwmarrin/snowflake v0.3.0 h1:xm67bEhkKh6ij1790JB83OujPR5CzNe8QuQqAgISZN0=
github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE= github.com/bwmarrin/snowflake v0.3.0/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=