minor: Do not use Member but required properties in TroopManagement.Kick

This commit is contained in:
Him188 2021-11-26 18:02:10 +00:00
parent 25970cbf56
commit 8e8dd0e26b
2 changed files with 6 additions and 4 deletions

View File

@ -171,7 +171,8 @@ internal class NormalMemberImpl constructor(
bot.network.run {
val response: TroopManagement.Kick.Response = TroopManagement.Kick(
client = bot.client,
member = this@NormalMemberImpl,
groupCode = group.groupCode,
memberId = id,
message = message,
ban = block
).sendAndExpect()

View File

@ -191,7 +191,8 @@ internal class TroopManagement {
operator fun invoke(
client: QQAndroidClient,
member: Member,
groupCode: Long,
memberId: Long,
message: String,
ban: Boolean
) = buildOutgoingUniPacket(client) {
@ -202,11 +203,11 @@ internal class TroopManagement {
serviceType = 0,//或者1
result = 0,
bodybuffer = Oidb0x8a0.ReqBody(
optUint64GroupCode = member.group.id,
optUint64GroupCode = groupCode,
msgKickList = listOf(
Oidb0x8a0.KickMemberInfo(
optUint32Operate = 5,
optUint64MemberUin = member.id,
optUint64MemberUin = memberId,
optUint32Flag = if (ban) 1 else 0 //1为拉黑
)
),