1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

feat: display login error code

This commit is contained in:
Mrs4s 2023-03-11 01:30:45 +08:00
parent 069f9d1335
commit a0e3291725
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -224,13 +224,7 @@ func loginResponseProcessor(res *client.LoginResponse) error {
os.Exit(0) os.Exit(0)
case client.OtherLoginError, client.UnknownLoginError, client.TooManySMSRequestError: case client.OtherLoginError, client.UnknownLoginError, client.TooManySMSRequestError:
msg := res.ErrorMessage msg := res.ErrorMessage
if strings.Contains(msg, "冻结") { log.Warnf("登录失败: %v Code: %v", msg, res.Code)
log.Warnf("账号被冻结")
log.Infof("按 Enter 继续....")
readLine()
os.Exit(0)
}
log.Warnf("登录失败: %v", msg)
log.Infof("按 Enter 继续....") log.Infof("按 Enter 继续....")
readLine() readLine()
os.Exit(0) os.Exit(0)