Commit 15d89f2b authored by Him188's avatar Him188

Fix build

parent 1a206612
......@@ -72,28 +72,26 @@ internal class MemberImpl(
override val group: GroupImpl by group.unsafeWeakRef()
val qq: QQImpl by qq.unsafeWeakRef()
override val bot: QQAndroidBot by bot.unsafeWeakRef()
override suspend fun mute(durationSeconds: Int): Boolean {
if(bot.uin==this@MemberImpl.qq.id)//不能自己禁言自己
if (bot.uin == this@MemberImpl.qq.id)//不能自己禁言自己
{
return false
}
//判断有无禁言权限
var myPermission = group.get(bot.uin).permission
val myPermission = group.get(bot.uin).permission
if (myPermission == MemberPermission.ADMINISTRATOR || myPermission == MemberPermission.OWNER) {
if (myPermission == MemberPermission.OWNER || (myPermission == MemberPermission.ADMINISTRATOR && permission == MemberPermission.MEMBER)) {
return if (myPermission == MemberPermission.OWNER || (myPermission == MemberPermission.ADMINISTRATOR && permission == MemberPermission.MEMBER)) {
bot.network.run {
val response = TroopManagement.Mute(
client = bot.client,
member = this@MemberImpl,
memberUin = id,
groupCode = group.id,
timeInSecond = durationSeconds
).sendAndExpect<TroopManagement.Mute.Response>()
}
return true
}else{
return false
true
} else {
false
}
} else {
return false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment