mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-20 02:18:23 +00:00
feat(lol): replace schedule source with PandaScore API
Swap the lol module upstream from the lolesports.com gql persisted-query client to PandaScore REST (/lol/matches, Bearer LOL_PANDASCORE_TOKEN, free tier 1000 req/h). The gql transport broke whenever Riot redeployed their frontend; PandaScore is a stable versioned contract. ScheduleEvent, formatters, cron, and the bson cache shape are unchanged: only the transport and response mapping moved. PandaScore league slugs canonicalize to the existing major-league allowlist; results join to opponents by team_id so reversed arrays cannot swap scores; outcomes are declared only once upstream commits a winner, preserving the score-pending rendering. A still-full final page now logs lol_page_budget_exhausted and the live page budget covers 500 raw matches per window. Missing token short-circuits with lol_token_missing before any upstream call; the 60-minute stale cache still covers outages. Document the new env var and cancel the superseded Leaguepedia score-enrichment plan.
This commit is contained in:
1 parent
d50dd3f2f5
commit
58c42c312b
11 files changed
+814
-310
No files matched your search
@@ -35,6 +35,7 @@ Copy [`.env.example`](../.env.example) → `.env` (gitignored) and fill in.
|
||||
| `ADMIN_IDS` | optional | CSV of admin ids (renamed from `ADMIN_USER_IDS`) |
|
||||
| `WHEELOFNAMES_API_URL` | optional | full `/api/gif` endpoint for remote `/wheelofnames` GIF rendering |
|
||||
| `WHEELOFNAMES_API_TOKEN` | optional | bearer token matching the wheelofnames service `API_TOKEN` |
|
||||
| `LOL_PANDASCORE_TOKEN` | ✅ for lol module | PandaScore API token (free tier) — secret, never logged; without it every `/lol*` fetch fails (stale cache may still serve briefly) |
|
||||
|
||||
**Leave UNSET on self-host:** `KV_PROVIDER`, `PORT`,
|
||||
`TELEGRAM_WEBHOOK_SECRET`, and `GOLD_VNAPP_API_KEY`. Stock, coin, and gold URL
|
||||
|
||||
Reference in new issue
Block a user