mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
fix: 滤除过期官方抽奖
This commit is contained in:
parent
28c2af93cf
commit
79c550db14
@ -87,11 +87,17 @@ class Monitor extends Public {
|
||||
let status = 0;
|
||||
if (Lottery.isOfficialLottery) {
|
||||
let { ts } = await BiliAPI.getLotteryNotice(Lottery.dyid);
|
||||
const ts_10 = Date.now() / 1000;
|
||||
if (ts < 0) {
|
||||
return 51
|
||||
}
|
||||
if (ts > (Date.now() / 1000) + config.maxday * 864e2) {
|
||||
log.info('过滤', '开奖时间晚于指定时间')
|
||||
if (ts < ts_10) {
|
||||
log.info('过滤', '已过开奖时间')
|
||||
MyStorage.updateDyid(Lottery.dyid)
|
||||
continue
|
||||
}
|
||||
if (ts > ts_10 + config.maxday * 86400) {
|
||||
log.info('过滤', '超过指定开奖时间')
|
||||
MyStorage.updateDyid(Lottery.dyid)
|
||||
continue
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user