add 增加接口失效提醒

This commit is contained in:
ZJY 2021-10-03 11:14:32 +08:00
parent 532a0473b0
commit 5983a4031e
2 changed files with 9 additions and 1 deletions

View File

@ -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")
}

View File

@ -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))