add 增加接口失效提醒
This commit is contained in:
parent
532a0473b0
commit
5983a4031e
@ -312,6 +312,7 @@ func CookieOK(ck *JdCookie) bool {
|
||||
}
|
||||
return true
|
||||
}
|
||||
(&JdCookie{}).Push("第一个接口失效,切换到第二个接口,可能黑IP")
|
||||
return av2(cookie)
|
||||
}
|
||||
|
||||
@ -329,5 +330,13 @@ func av2(cookie string) bool {
|
||||
if err != nil {
|
||||
return true
|
||||
}
|
||||
if strings.Contains(data, "login") {
|
||||
return false
|
||||
} else if strings.Contains(data, "nickname") {
|
||||
return true
|
||||
} else {
|
||||
(&JdCookie{}).Push("第二个接口失效,可能黑IP")
|
||||
return true
|
||||
}
|
||||
return !strings.Contains(data, "login")
|
||||
}
|
||||
|
||||
@ -197,7 +197,6 @@ var handleMessage = func(msgs ...interface{}) interface{} {
|
||||
coin := GetCoin(sender.UserID)
|
||||
if coin < Config.tytnum {
|
||||
return fmt.Sprintf("推一推需要%d个互助值", Config.tytnum)
|
||||
|
||||
}
|
||||
RemCoin(sender.UserID, 8)
|
||||
sender.Reply(fmt.Sprintf("推一推即将开始,已扣除%d个互助值", Config.tytnum))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user