From 25970cbf5602e3038ab59d36d0c72dc9921cf966 Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 26 Nov 2021 17:58:56 +0000 Subject: [PATCH] minor: move `NormalMember.kick` overloads from mirai-core to mirai-core-api --- mirai-core-api/src/commonMain/kotlin/contact/NormalMember.kt | 2 +- mirai-core/src/commonMain/kotlin/contact/NormalMemberImpl.kt | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/mirai-core-api/src/commonMain/kotlin/contact/NormalMember.kt b/mirai-core-api/src/commonMain/kotlin/contact/NormalMember.kt index a35a56cb0..18570a85e 100644 --- a/mirai-core-api/src/commonMain/kotlin/contact/NormalMember.kt +++ b/mirai-core-api/src/commonMain/kotlin/contact/NormalMember.kt @@ -124,7 +124,7 @@ public interface NormalMember : Member { * @throws PermissionDeniedException 无权限修改时 * */ - public suspend fun kick(message: String) + public suspend fun kick(message: String): Unit = kick(message, false) /** diff --git a/mirai-core/src/commonMain/kotlin/contact/NormalMemberImpl.kt b/mirai-core/src/commonMain/kotlin/contact/NormalMemberImpl.kt index 1eedb8e25..ccfed852a 100644 --- a/mirai-core/src/commonMain/kotlin/contact/NormalMemberImpl.kt +++ b/mirai-core/src/commonMain/kotlin/contact/NormalMemberImpl.kt @@ -163,10 +163,6 @@ internal class NormalMemberImpl constructor( this._muteTimestamp = 0 } - override suspend fun kick(message: String) { - kick(message, false) - } - override suspend fun kick(message: String, block: Boolean) { checkBotPermissionHigherThanThis("kick") check(group.members[this.id] != null) {