From bd3e73ae425a0c2ef407f15ede342bb2d04344f8 Mon Sep 17 00:00:00 2001 From: Him188 Date: Sat, 4 Apr 2020 14:20:22 +0800 Subject: [PATCH] Simplify constructor --- .../{MessageTooLargeException.kt => exceptions.kt} | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) rename mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/{MessageTooLargeException.kt => exceptions.kt} (84%) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/MessageTooLargeException.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/exceptions.kt similarity index 84% rename from mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/MessageTooLargeException.kt rename to mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/exceptions.kt index ce789df3e..ce52912e8 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/MessageTooLargeException.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/exceptions.kt @@ -40,10 +40,7 @@ class MessageTooLargeException( */ @SinceMirai("0.33.0") class BotIsBeingMutedException( - val target: Group, - /** - * 被禁言剩余时间 - * @see Group.botMuteRemaining - */ - val remainingMillis: Int -) : RuntimeException() \ No newline at end of file + val target: Group +) : RuntimeException("bot is being muted, remaining ${target.botMuteRemaining} seconds") + +val BotIsBeingMutedException.botMuteRemaining: Int get() = target.botMuteRemaining \ No newline at end of file