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

fix typo.

This commit is contained in:
Mrs4s 2020-09-13 20:51:57 +08:00
parent 6101c4d8a9
commit 6f251e3dec
3 changed files with 42 additions and 16 deletions

View File

@ -655,6 +655,18 @@ func (bot *CQBot) CQGetVersionInfo() MSG {
"runtime_version": runtime.Version(),
"runtime_os": runtime.GOOS,
"version": Version,
"protocol": func() int {
switch client.SystemDeviceInfo.Protocol {
case client.AndroidPad:
return 0
case client.AndroidPhone:
return 1
case client.AndroidWatch:
return 2
default:
return -1
}
}(),
})
}

View File

@ -216,11 +216,11 @@ func (bot *CQBot) groupNotifyEvent(c *client.QQClient, e client.IGroupNotifyEven
"post_type": "notice",
"group_id": group.Code,
"notice_type": "notify",
"notify_type": "poke",
"sub_type": "poke",
"self_id": c.Uin,
"user_id": notify.Sender,
"sender_id": notify.Sender,
"receiver_id": notify.Receiver,
"target_id": notify.Receiver,
"time": time.Now().Unix(),
})
case *client.GroupRedBagLuckyKingNotifyEvent:
@ -228,15 +228,15 @@ func (bot *CQBot) groupNotifyEvent(c *client.QQClient, e client.IGroupNotifyEven
luckyKing := group.FindMember(notify.LuckyKing)
log.Infof("群 %v 内 %v 的红包被抢完, %v 是运气王", formatGroupName(group), formatMemberName(sender), formatMemberName(luckyKing))
bot.dispatchEventMessage(MSG{
"post_type": "notice",
"group_id": group.Code,
"notice_type": "notify",
"notify_type": "lucky_king",
"self_id": c.Uin,
"user_id": notify.Sender,
"sender_id": notify.Sender,
"lucky_king_id": notify.LuckyKing,
"time": time.Now().Unix(),
"post_type": "notice",
"group_id": group.Code,
"notice_type": "notify",
"sub_type": "lucky_king",
"self_id": c.Uin,
"user_id": notify.Sender,
"sender_id": notify.Sender,
"target_id": notify.LuckyKing,
"time": time.Now().Unix(),
})
case *client.MemberHonorChangedNotifyEvent:
log.Info(notify.Content())
@ -244,7 +244,7 @@ func (bot *CQBot) groupNotifyEvent(c *client.QQClient, e client.IGroupNotifyEven
"post_type": "notice",
"group_id": group.Code,
"notice_type": "notify",
"notify_type": "honor",
"sub_type": "honor",
"self_id": c.Uin,
"user_id": notify.Uin,
"time": time.Now().Unix(),

View File

@ -386,9 +386,9 @@ Type: `cardimage`
| ------------- | ------ | -------------- | -------------- |
| `post_type` | string | `notice` | 上报类型 |
| `notice_type` | string | `notify` | 消息类型 |
| `notify_type` | string | `poke` | 提示类型 |
| `sub_type` | string | `poke` | 提示类型 |
| `user_id` | int64 | | 发送者id |
| `receiver_id` | int64 | | 被戳者id |
| `target_id` | int64 | | 被戳者id |
#### 群红包运气王提示
@ -400,6 +400,20 @@ Type: `cardimage`
| ------------- | ------ | -------------- | -------------- |
| `post_type` | string | `notice` | 上报类型 |
| `notice_type` | string | `notify` | 消息类型 |
| `notify_type` | string | `lucky_king` | 提示类型 |
| `sub_type` | string | `lucky_king` | 提示类型 |
| `user_id` | int64 | | 红包发送者id |
| `lucky_king_id` | int64 | | 运气王id |
| `target_id` | int64 | | 运气王id |
#### 群成员荣誉变更提示
> 注意:此事件无法在平板和手表协议上触发
**上报数据**
| 字段 | 类型 | 可能的值 | 说明 |
| ------------- | ------ | -------------- | -------------- |
| `post_type` | string | `notice` | 上报类型 |
| `notice_type` | string | `notify` | 消息类型 |
| `sub_type` | string | `honor` | 提示类型 |
| `user_id` | int64 | | 成员id |
| `honor_type` | int64 | `talkative:龙王` `performer:群聊之火` `emotion:快乐源泉` | 荣誉类型 |