|
@@ -27,7 +27,11 @@ public sealed class AutoLoginEvent : BotEvent, ConsoleEvent, AbstractEvent() {
|
|
|
*/
|
|
|
public class Success @MiraiInternalApi constructor(
|
|
|
override val bot: Bot
|
|
|
- ) : AutoLoginEvent()
|
|
|
+ ) : AutoLoginEvent() {
|
|
|
+ override fun toString(): String {
|
|
|
+ return "AutoLoginEvent.Success(bot=${bot.id}, protocol=${bot.configuration.protocol}, heartbeatStrategy=${bot.configuration.heartbeatStrategy})"
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 登录失败
|
|
@@ -35,5 +39,9 @@ public sealed class AutoLoginEvent : BotEvent, ConsoleEvent, AbstractEvent() {
|
|
|
public class Failure @MiraiInternalApi constructor(
|
|
|
override val bot: Bot,
|
|
|
public val cause: Throwable
|
|
|
- ) : AutoLoginEvent()
|
|
|
+ ) : AutoLoginEvent() {
|
|
|
+ override fun toString(): String {
|
|
|
+ return "AutoLoginEvent.Failure(bot=${bot.id}, protocol=${bot.configuration.protocol}, cause=${cause})"
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|