diff --git a/README.md b/README.md index 4cd982b..ea9e87c 100644 --- a/README.md +++ b/README.md @@ -80,13 +80,14 @@ | ------------------------------------------------------------ | | [私聊信息](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=加群请求/邀请) | diff --git a/docs/config.md b/docs/config.md index 3ba218a..cedef08 100644 --- a/docs/config.md +++ b/docs/config.md @@ -90,3 +90,28 @@ go-cqhttp 支持导入CQHTTP的配置文件, 具体步骤为: > 注2: 分片发送为原酷Q发送长消息的老方案, 发送速度更优/兼容性更好,但在有发言频率限制的群里,可能无法发送。关闭后将优先使用新方案, 能发送更长的消息, 但发送速度更慢,在部分老客户端将无法解析. > 注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` 有的限制外还包括: 无法接收撤回消息 | + +> 注意, 根据协议的不同, 各类消息有所限制 \ No newline at end of file diff --git a/docs/cqhttp.md b/docs/cqhttp.md index 6c13a80..3ef1681 100644 --- a/docs/cqhttp.md +++ b/docs/cqhttp.md @@ -18,6 +18,20 @@ Type : `reply` 示例: `[CQ:reply,id=123456]` +### 红包 + +Type: `redbag` + +范围: **接收** + +参数: + +| 参数名 | 类型 | 说明 | +| ------ | ------ | ----------- | +| title | string | 祝福语/口令 | + +示例: `[CQ:redbag,title=恭喜发财]` + ### 合并转发 Type: `forward` @@ -362,3 +376,30 @@ Type: `cardimage` | `user_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 | diff --git a/docs/file.md b/docs/file.md index 4fe926e..8ab82d0 100644 --- a/docs/file.md +++ b/docs/file.md @@ -7,6 +7,7 @@ go-cqhttp 默认生成的文件树如下所示: ├── go-cqhttp ├── config.json ├── device.json +├── servers.bin ├── logs │ └── xx-xx-xx.log └── data @@ -20,6 +21,7 @@ go-cqhttp 默认生成的文件树如下所示: | go-cqhttp | go-cqhttp可执行文件 | | config.json | 运行配置文件 | | device.json | 虚拟设备配置文件 | +| servers.bin | 储存QQ服务器地址 | | logs | 日志存放目录 | | data | 数据目录 | | data/images | 图片缓存目录 | diff --git a/go.mod b/go.mod index a83d409..1599353 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/Mrs4s/go-cqhttp go 1.14 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/gin-gonic/gin v1.6.3 github.com/go-playground/validator/v10 v10.3.0 // indirect diff --git a/go.sum b/go.sum index db88753..3f7e308 100644 --- a/go.sum +++ b/go.sum @@ -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/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-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/go.mod h1:NdZxfVWX+oR6y2K0o6qAYv6gIOP9rjG0/E9WsDpxqwE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=