diff --git a/coolq/api.go b/coolq/api.go index 61a8ab88f..ba5f472c7 100644 --- a/coolq/api.go +++ b/coolq/api.go @@ -134,11 +134,10 @@ func (bot *CQBot) CQGetGroupList(noCache bool, spec *onebot.Spec) global.MSG { gs := make([]global.MSG, 0, len(grpInfos)) for _, g := range grpInfos { gs = append(gs, global.MSG{ - "group_id": spec.ConvertID(g.GroupUin), - "group_name": g.GroupName, - // TODO nt协议好像获取不到这俩信息 - "group_create_time": 0, - "group_level": 0, + "group_id": spec.ConvertID(g.GroupUin), + "group_name": g.GroupName, + "group_create_time": g.GroupCreateTime, + "group_level": g.GroupLevel, "max_member_count": g.MaxMember, "member_count": g.MemberCount, }) @@ -159,8 +158,8 @@ func (bot *CQBot) CQGetGroupInfo(groupID int64, noCache bool, spec *onebot.Spec) return OK(global.MSG{ "group_id": spec.ConvertID(group.GroupUin), "group_name": group.GroupName, - "group_create_time": 0, - "group_level": 0, + "group_create_time": group.GroupCreateTime, + "group_level": group.GroupLevel, "max_member_count": group.MaxMember, "member_count": group.MemberCount, }) diff --git a/coolq/event.go b/coolq/event.go index ec6050f9b..e610ae8f8 100644 --- a/coolq/event.go +++ b/coolq/event.go @@ -423,8 +423,7 @@ func (bot *CQBot) friendRequestEvent(_ *client.QQClient, e *event2.NewFriendRequ //} func (bot *CQBot) groupInvitedEvent(_ *client.QQClient, e *event2.GroupInvite) { - // todo: 暂时先这样吧,群名不好拿 - log.Infof("收到来自群 %v(%v) 内用户 %v(%v) 的加群邀请.", e.GroupUin, e.GroupUin, e.InvitorNick, e.InvitorUin) + log.Infof("收到来自群 %v(%v) 内用户 %v(%v) 的加群邀请.", e.GroupName, e.GroupUin, e.InvitorNick, e.InvitorUin) flag := strconv.FormatInt(int64(e.RequestSeq), 10) bot.dispatchEvent("request/group/invite", global.MSG{ "group_id": e.GroupUin, diff --git a/go.mod b/go.mod index b11fb0852..4b13ce750 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/FloatTech/sqlite v1.6.3 - github.com/LagrangeDev/LagrangeGo v0.0.0-20241006144137-4fc7fcb8caa1 + github.com/LagrangeDev/LagrangeGo v0.1.1-0.20241007040125-9f9cfb87932a github.com/Microsoft/go-winio v0.6.2-0.20230724192519-b29bbd58a65a github.com/RomiChan/syncx v0.0.0-20240418144900-b7402ffdebc7 github.com/RomiChan/websocket v1.4.3-0.20220227141055-9b2c6168c9c5 diff --git a/go.sum b/go.sum index 27226fd65..e77f92147 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/FloatTech/sqlite v1.6.3 h1:MQkqBNlkPuCoKQQgoNLuTL/2Ci3tBTFAnVYBdD0Wy4 github.com/FloatTech/sqlite v1.6.3/go.mod h1:zFbHzRfB+CJ+VidfjuVbrcin3DAz283F7hF1hIeHzpY= github.com/FloatTech/ttl v0.0.0-20230307105452-d6f7b2b647d1 h1:g4pTnDJUW4VbJ9NvoRfUvdjDrHz/6QhfN/LoIIpICbo= github.com/FloatTech/ttl v0.0.0-20230307105452-d6f7b2b647d1/go.mod h1:fHZFWGquNXuHttu9dUYoKuNbm3dzLETnIOnm1muSfDs= -github.com/LagrangeDev/LagrangeGo v0.0.0-20241006144137-4fc7fcb8caa1 h1:qbUK72LzMKXiAHaRVVfpJLxS5eQwQsYKyrHarOp7OQM= -github.com/LagrangeDev/LagrangeGo v0.0.0-20241006144137-4fc7fcb8caa1/go.mod h1:qK/l75YuMYdJWfPcxPhfjybJdXD4kzMFvcbKlvdAoa0= +github.com/LagrangeDev/LagrangeGo v0.1.1-0.20241007040125-9f9cfb87932a h1:e+FTzpaPBjT1L/+7QNxAlo9ili5YQa+fzQ2Q9LpCS+U= +github.com/LagrangeDev/LagrangeGo v0.1.1-0.20241007040125-9f9cfb87932a/go.mod h1:qK/l75YuMYdJWfPcxPhfjybJdXD4kzMFvcbKlvdAoa0= github.com/Microsoft/go-winio v0.6.2-0.20230724192519-b29bbd58a65a h1:aU1703IHxupjzipvhu16qYKLMR03e+8WuNR+JMsKfGU= github.com/Microsoft/go-winio v0.6.2-0.20230724192519-b29bbd58a65a/go.mod h1:OZqLNXdYJHmx7aqq/T6wAdFEdoGm5nmIfC4kU7M8P8o= github.com/RomiChan/protobuf v0.1.1-0.20230204044148-2ed269a2e54d h1:/Xuj3fIiMY2ls1TwvPKmaqQrtJsPY+c9s+0lOScVHd8=