bilibili-raffle-js
bilibili-raffle-js copied to clipboard
client端设计问题
TS implementation overview
任务全放进account里有些难看了 这里分类出来各自形成class
raffle-handler/
- storm.ts
- smalltv.ts
- pk.ts
- guard.ts
- ? anchor.ts ?
live-daily.ts
- live-sign
- heartbeat
- silverbox
- fan-group-sign
- ? exchange-coin ?
- ? send-gift ?
main-daily.ts
- watch-video
- share-video
- ? send-coin ?
- ? judge-case ?
Schedule Format
每个任务都要改一遍时间太麻烦了 直接上模板 简略休眠复杂度(精确到小时而非分钟)
task-config.json
{
"task-schedule-1": {
"tv_pk_guard": {
"on": true,
"sleep": [1,2,3,4,5,6]
},
"storm": {
"on": true,
"sleep": [1,2,3,4,5,6]
}
}
}
user-config.json
{
"username": "",
"password": "",
"sleep-schedule": "task-schedule-1"
}
结果不想写了233333
I committed a change which, though not a total refactoring, at least simplifies task schedule configuration. If you think it's an ok stopgap solution, I can create a PR.
https://github.com/blu3mania/bilibili-raffle-js/commit/d6212d012b42214b15d1e89f4f06909512a27233
Sure, this is valid.