mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-08 18:47:14 +08:00
SystemMsgNewGroup type 3
This commit is contained in:
parent
e365990586
commit
f99981baa9
@ -145,7 +145,7 @@ internal class NewContact {
|
|||||||
readBytes().loadAs(Structmsg.RspSystemMsgNew.serializer()).run {
|
readBytes().loadAs(Structmsg.RspSystemMsgNew.serializer()).run {
|
||||||
val struct = groupmsgs?.firstOrNull()
|
val struct = groupmsgs?.firstOrNull()
|
||||||
|
|
||||||
return struct?.msg?.run<Structmsg.SystemMsg, Packet> {
|
return struct?.msg?.run {
|
||||||
//this.soutv("SystemMsg")
|
//this.soutv("SystemMsg")
|
||||||
when (subType) {
|
when (subType) {
|
||||||
1 -> { //管理员邀请
|
1 -> { //管理员邀请
|
||||||
@ -179,6 +179,10 @@ internal class NewContact {
|
|||||||
|
|
||||||
BotJoinGroupEvent.Invite(invitor)
|
BotJoinGroupEvent.Invite(invitor)
|
||||||
}
|
}
|
||||||
|
3 -> {
|
||||||
|
// 已被请他管理员处理
|
||||||
|
null
|
||||||
|
}
|
||||||
5 -> {
|
5 -> {
|
||||||
val group = bot.getGroupOrNull(groupCode) ?: return null
|
val group = bot.getGroupOrNull(groupCode) ?: return null
|
||||||
val operator = group[actionUin]
|
val operator = group[actionUin]
|
||||||
@ -190,7 +194,7 @@ internal class NewContact {
|
|||||||
additional = "并尽量描述此时机器人是否正被邀请加入群, 或者是有有新群员加入此群"
|
additional = "并尽量描述此时机器人是否正被邀请加入群, 或者是有有新群员加入此群"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} as Packet // 没有 as Packet 垃圾 kotlin 会把类型推断为Any
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user