|
1 | 1 | // Todo: 待添加多账号签到 |
2 | 2 | // ToDo: 种菜赚金币 |
3 | 3 | // ToDo: 幸运大转盘自动获取阶段奖励,奖励每周重置 |
| 4 | +// Warn: 睡觉仅在20点和12点触发,获取奖励在8点和14触发 |
4 | 5 | const cookieName = '趣头条' |
5 | 6 | const signKey = 'senku_signKey_qtt' |
6 | 7 | const signXTKKey = 'senku_signXTK_qtt' |
@@ -32,10 +33,10 @@ const playUrl = [adUrl + 'pos=one', adUrl + 'pos=two', adUrl + 'pos=three', adUr |
32 | 33 | await getcoininfo() |
33 | 34 | await getreadReward() |
34 | 35 | } |
35 | | - if (new Date().getHours() >= 20) { |
| 36 | + if (new Date().getHours() == 20 || new Date().getHours() == 12) { |
36 | 37 | await sleep() |
37 | 38 | } |
38 | | - if (new Date().getHours() >= 8 && new Date().getHours() <= 12) { |
| 39 | + if (new Date().getHours() == 8 || new Date().getHours() == 14) { |
39 | 40 | await sleepReward() |
40 | 41 | } |
41 | 42 | await signDay() |
@@ -158,7 +159,7 @@ function getreadReward() { |
158 | 159 | resolve(readReward(15)) |
159 | 160 | } else if (read_num == 18) { |
160 | 161 | resolve(readReward(18)) |
161 | | - } |
| 162 | + } else resolve() |
162 | 163 | } |
163 | 164 | } catch (e) { |
164 | 165 | senku.msg(cookieName, `获取阅读奖励: 失败`, `说明: ${e}`) |
@@ -374,7 +375,7 @@ function showmsg() { |
374 | 375 | subTitle += '每日:✅' |
375 | 376 | detail += `【每日签到】获得${currentCoin}💰,明日可得${nextCoin}💰\n` |
376 | 377 | } |
377 | | - else subTitle += '每日:🔄' |
| 378 | + else subTitle += '' |
378 | 379 | } else { |
379 | 380 | subTitle += '每日:❌' |
380 | 381 | senku.log(`❌ ${cookieName} showmsg - 每日签到: ${JSON.stringify(signinfo.signDay)}`) |
@@ -407,7 +408,7 @@ function showmsg() { |
407 | 408 | } else if (signinfo.sleepReward && signinfo.sleepReward.data) { |
408 | 409 | if (signinfo.sleepReward.data.success) { |
409 | 410 | const coins = signinfo.sleepReward.data.coins |
410 | | - detail += `【睡觉金币】获得${coins}💰\n` |
| 411 | + coins == 0 ? detail += `` : detail += `【睡觉金币】获得${coins}💰\n` |
411 | 412 | } else { |
412 | 413 | detail += `【睡觉金币】金币获取失败\n` |
413 | 414 | } |
@@ -438,13 +439,13 @@ function showmsg() { |
438 | 439 | const count = signinfo.signLucky.count |
439 | 440 | const count_limit = signinfo.signLucky.count_limit |
440 | 441 | detail += `【幸运转盘】获得${amount_coin},抽奖情况:${count}/${count_limit}次\n` |
441 | | - } else subTitle += `转盘:次数上限` |
| 442 | + } else subTitle += `` |
442 | 443 |
|
443 | 444 | // playAdsMsg |
444 | 445 | subTitle += subTitle == '' ? '' : ', ' |
445 | 446 | if (signinfo.playList) { |
446 | 447 | if (signinfo.playList[0].code == 0) { |
447 | | - subTitle += '广告:✅' |
| 448 | + subTitle += '' |
448 | 449 | const icon = signinfo.info.data.signIn.ext_ad.icon |
449 | 450 | const coins = signinfo.info.data.show_balance_info.coins |
450 | 451 | const continuation = signinfo.info.data.signIn.continuation |
|
0 commit comments