mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-25 04:50:26 +08:00
feat: AutoLoginEvent.toString
This commit is contained in:
parent
bd3f50f848
commit
35d22e911f
@ -36,4 +36,11 @@ public sealed class AutoLoginEvent : BotEvent, ConsoleEvent, AbstractEvent() {
|
||||
override val bot: Bot,
|
||||
public val cause: Throwable
|
||||
) : AutoLoginEvent()
|
||||
|
||||
override fun toString(): String {
|
||||
return when (this) {
|
||||
is Success -> "AutoLoginEvent.Success(bot=${bot.id}, protocol=${bot.configuration.protocol}, heartbeatStrategy=${bot.configuration.heartbeatStrategy})"
|
||||
is Failure -> "AutoLoginEvent.Failure(bot=${bot.id}, protocol=${bot.configuration.protocol}, message=${cause.message})"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user