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

邀请入群添加邀请人id [invitor_id]

This commit is contained in:
xiangxiangxiong9 2022-12-20 20:37:08 +08:00
parent 8343db5ae3
commit b05a64fc1b
No known key found for this signature in database
GPG Key ID: D01786C0000CF134

View File

@ -543,10 +543,11 @@ func (bot *CQBot) groupInvitedEvent(c *client.QQClient, e *client.GroupInvitedRe
log.Infof("收到来自群 %v(%v) 内用户 %v(%v) 的加群邀请.", e.GroupName, e.GroupCode, e.InvitorNick, e.InvitorUin) log.Infof("收到来自群 %v(%v) 内用户 %v(%v) 的加群邀请.", e.GroupName, e.GroupCode, e.InvitorNick, e.InvitorUin)
flag := strconv.FormatInt(e.RequestId, 10) flag := strconv.FormatInt(e.RequestId, 10)
bot.dispatchEvent("request/group/invite", global.MSG{ bot.dispatchEvent("request/group/invite", global.MSG{
"group_id": e.GroupCode, "group_id": e.GroupCode,
"user_id": e.InvitorUin, "user_id": e.InvitorUin,
"comment": "", "invitor_id": 0,
"flag": flag, "comment": "",
"flag": flag,
}) })
} }
@ -554,10 +555,11 @@ func (bot *CQBot) groupJoinReqEvent(c *client.QQClient, e *client.UserJoinGroupR
log.Infof("群 %v(%v) 收到来自用户 %v(%v) 的加群请求.", e.GroupName, e.GroupCode, e.RequesterNick, e.RequesterUin) log.Infof("群 %v(%v) 收到来自用户 %v(%v) 的加群请求.", e.GroupName, e.GroupCode, e.RequesterNick, e.RequesterUin)
flag := strconv.FormatInt(e.RequestId, 10) flag := strconv.FormatInt(e.RequestId, 10)
bot.dispatchEvent("request/group/add", global.MSG{ bot.dispatchEvent("request/group/add", global.MSG{
"group_id": e.GroupCode, "group_id": e.GroupCode,
"user_id": e.RequesterUin, "user_id": e.RequesterUin,
"comment": e.Message, "invitor_id": e.ActionUin,
"flag": flag, "comment": e.Message,
"flag": flag,
}) })
} }