From 5fb1d714f7baf4e31cf19cba27861142f69040bd Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Sat, 15 Oct 2022 22:39:27 +0800 Subject: [PATCH] [core] Improve exception message of `Outdated Version` --- .../kotlin/network/components/SsoProcessor.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mirai-core/src/commonMain/kotlin/network/components/SsoProcessor.kt b/mirai-core/src/commonMain/kotlin/network/components/SsoProcessor.kt index 52d113d63..4884108d7 100644 --- a/mirai-core/src/commonMain/kotlin/network/components/SsoProcessor.kt +++ b/mirai-core/src/commonMain/kotlin/network/components/SsoProcessor.kt @@ -314,6 +314,16 @@ internal class SsoProcessorImpl( if (msg.contains("当前登录存在安全风险")) { // Error(title=禁止登录, message=当前上网环境异常,请更换网络环境或在常用设备上登录或稍后再试。, errorInfo=) append(", mirai 提示: 这可能是尝试登录次数过多导致的, 请等待一段时间后再试") } + if (!sliderSupported) { + append(", extra={ sliderSupported=false, login-solver=").append(bot.configuration.loginSolver) + append(" <").append( + bot.configuration.loginSolver?.let { it::class } + ) + append("> }") + if (msg.contains("版本过低")) { + append(", mirai 提示: 提供给 mirai 的验证码处理器不支持滑块验证, 请报告至此验证器的作者") + } + } })) }