Merge remote-tracking branch 'origin/master'

This commit is contained in:
Him188 2020-02-18 13:38:32 +08:00
commit c4a18321bb

View File

@ -4,6 +4,7 @@ import kotlinx.coroutines.delay
import net.mamoe.mirai.Bot import net.mamoe.mirai.Bot
import net.mamoe.mirai.utils.DefaultLoginSolver import net.mamoe.mirai.utils.DefaultLoginSolver
import net.mamoe.mirai.utils.LoginSolver import net.mamoe.mirai.utils.LoginSolver
import net.mamoe.mirai.utils.LoginSolverInputReader
import kotlin.concurrent.thread import kotlin.concurrent.thread
class MiraiConsoleUIPure() : MiraiConsoleUI { class MiraiConsoleUIPure() : MiraiConsoleUI {
@ -55,7 +56,13 @@ class MiraiConsoleUIPure() : MiraiConsoleUI {
} }
override fun createLoginSolver(): LoginSolver { override fun createLoginSolver(): LoginSolver {
return DefaultLoginSolver() return DefaultLoginSolver(
reader = object : LoginSolverInputReader {
override suspend fun read(question: String): String? {
return requestInput(question)
}
}
)
} }
} }