mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-05 23:50:08 +08:00
minor: Do not use Member but required properties in TroopManagement.Kick
This commit is contained in:
parent
25970cbf56
commit
8e8dd0e26b
@ -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()
|
||||
|
@ -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为拉黑
|
||||
)
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user