Init ConsoleInput and BotManager on start

This commit is contained in:
Him188 2020-09-08 21:43:00 +08:00
parent 9fec51977e
commit 3183bc4018

View File

@ -39,6 +39,7 @@ import net.mamoe.mirai.console.permission.PermissionService
import net.mamoe.mirai.console.plugin.PluginLoader import net.mamoe.mirai.console.plugin.PluginLoader
import net.mamoe.mirai.console.plugin.PluginManager import net.mamoe.mirai.console.plugin.PluginManager
import net.mamoe.mirai.console.plugin.center.PluginCenter import net.mamoe.mirai.console.plugin.center.PluginCenter
import net.mamoe.mirai.console.util.BotManager
import net.mamoe.mirai.console.util.ConsoleExperimentalAPI import net.mamoe.mirai.console.util.ConsoleExperimentalAPI
import net.mamoe.mirai.console.util.ConsoleInput import net.mamoe.mirai.console.util.ConsoleInput
import net.mamoe.mirai.utils.* import net.mamoe.mirai.utils.*
@ -110,11 +111,15 @@ internal object MiraiConsoleImplementationBridge : CoroutineScope, MiraiConsoleI
} }
} }
ConsoleInput
// start // start
phase `load configurations`@{ phase `load configurations`@{
mainLogger.verbose { "Loading configurations..." } mainLogger.verbose { "Loading configurations..." }
ConsoleDataScope.reloadAll() ConsoleDataScope.reloadAll()
BotManager
} }
val pluginLoadSession: PluginManagerImpl.PluginLoadSession val pluginLoadSession: PluginManagerImpl.PluginLoadSession
@ -135,7 +140,7 @@ internal object MiraiConsoleImplementationBridge : CoroutineScope, MiraiConsoleI
mainLogger.verbose { "${PluginManager.plugins.size} such plugin(s) loaded." } mainLogger.verbose { "${PluginManager.plugins.size} such plugin(s) loaded." }
} }
SingletonExtensionSelector // init SingletonExtensionSelector.instance // init
phase `load PermissionService`@{ phase `load PermissionService`@{
mainLogger.verbose { "Loading PermissionService..." } mainLogger.verbose { "Loading PermissionService..." }