Name and permission analyzing is now available

This commit is contained in:
Him188 2019-10-18 19:33:51 +08:00
parent d5587bb3d8
commit 735b0934b6
3 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import net.mamoe.mirai.contact.Group
import net.mamoe.mirai.contact.QQ
import net.mamoe.mirai.message.Message
import net.mamoe.mirai.message.MessageChain
import net.mamoe.mirai.network.protocol.tim.packet.SenderPermission
import net.mamoe.mirai.network.protocol.tim.packet.event.SenderPermission
abstract class GroupEvent(bot: Bot, val group: Group) : BotEvent(bot)

View File

@ -17,6 +17,7 @@ import net.mamoe.mirai.network.protocol.tim.packet.action.ClientSendFriendMessag
import net.mamoe.mirai.network.protocol.tim.packet.action.ClientSendGroupMessagePacket
import net.mamoe.mirai.network.protocol.tim.packet.action.ServerSendFriendMessageResponsePacket
import net.mamoe.mirai.network.protocol.tim.packet.action.ServerSendGroupMessageResponsePacket
import net.mamoe.mirai.network.protocol.tim.packet.event.*
import net.mamoe.mirai.utils.MiraiLogger
/**

View File

@ -57,7 +57,7 @@ class ServerGroupMessageEventPacket(input: ByteReadPacket, eventIdentity: EventP
senderPermission = when (val value0x03 = tlv.getValue(0x03)[0].toUInt()) {
0x04u -> SenderPermission.OWNER
0x03u -> {
0x02u -> {
when (val value0x04 = tlv.getValue(0x04)[3].toUInt()) {
0x08u -> SenderPermission.OPERATOR
0x10u -> SenderPermission.MEMBER