mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-04-28 10:20:35 +00:00
refactor(loldle): trim module to current behavior only
KV payload cleanup: - drop lastResultAt from stats (never read) - drop solved/giveup flags from game state (round is immediately replaced after finish, making the flags transient noise) - skip redundant saveGame on winning/giveup/out-of-guesses paths; startFreshGame overwrites anyway Code cleanup: - delete daily.js + daily.test.js (pickDaily/todayUtc were speculative "future use" — only pickRandom was wired in, inlined into handlers) - drop the dead switch default in compare.js - trim file preambles across the module Docs: rewrite README around current behavior with loldle.net as the sole data source; update scraper header to match the raw schema.
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* @file scrape-loldle-data — rebuilds src/modules/loldle/champions.json from
|
||||
* loldle.net's JS bundle, the canonical source for the classic-mode axes:
|
||||
* gender, species, resource, attackType, region, lane, releaseDate.
|
||||
* @file Rebuilds src/modules/loldle/champions.json from loldle.net's JS
|
||||
* bundle. The bundle embeds the full champion array in plaintext — one
|
||||
* record per champion with fields: _id, championId, championName, gender,
|
||||
* positions, species, resource, range_type, regions, release_date.
|
||||
*
|
||||
* loldle.net embeds the full champion array in plaintext inside its JS bundle
|
||||
* at `<script src="js/index.<hash>.js">`, one record per champion with the
|
||||
* exact shape the bot needs. No CryptoJS decoding, no ddragon merge.
|
||||
*
|
||||
* Writes src/modules/loldle/champions.json. The bot imports this JSON
|
||||
* directly via `with { type: "json" }` (Node 24 + wrangler 4.x).
|
||||
*
|
||||
* Usage:
|
||||
* node scripts/scrape-loldle-data.js
|
||||
* The bot imports the resulting JSON directly via `with { type: "json" }`.
|
||||
*
|
||||
* Usage: node scripts/scrape-loldle-data.js
|
||||
* Schedule: weekly via .github/workflows/scrape-loldle-data.yml
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user