Initialize MiraiConsole when MiraiConsoleInitializer.init called

This commit is contained in:
Karlatemp 2020-06-22 12:14:03 +08:00
parent 2c09f1d82d
commit 4f418e7a0b
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

View File

@ -32,6 +32,7 @@ internal object MiraiConsoleInitializer {
/** 由前端调用 */
internal fun init(instance: IMiraiConsole) {
this.instance = instance
MiraiConsole.initialize()
}
}
@ -95,6 +96,10 @@ object MiraiConsole : CoroutineScope, IMiraiConsole {
@MiraiExperimentalAPI
fun newLogger(identity: String?): MiraiLogger = frontEnd.loggerFor(identity)
internal fun initialize() {
// Only for initialize
}
}