feat(games): move /wordle and /loldle to the web games and add /loldledaily

/wordle and /loldle now send the wordle and loldle BotFather games in an
unlimited mode: each player gets their own word or champion, saved after
every guess, with a New game button. Cards the bot did not record as
unlimited, including the daily cards, play the daily puzzle. The helper
commands keep working on the player's round.

/loldledaily mirrors /wordledaily: one champion per day at 07:00 ICT,
subscribe and unsubscribe, the morning recap and the live group results.

The daily and unlimited machinery is shared in util/guessgame, the old
in-chat wordle module is removed, and a one-time startup migration carries
each player's stats and unfinished round over without changing old data.
This commit is contained in:
tiennm99 committed 2026-10-10 09:29:48 +07:00
1 parent bc8a7d8869
commit 629b513c91
80 files changed
+7965 -3099

No files matched your search

+10 -2
View File
@@ -14,8 +14,9 @@ MONGO_DATABASE=tiennm99bot
# ============================ Operational =========================
# Comma-separated module list. Empty = load every module, including any module
# added later — so list them explicitly when a deployment should only gain a new
# module deliberately.
MODULES=util,misc,random,amlich,wordle,loldle,noitu,lol,stock,gold,coin,stats,monkeyd,sticker,alias,blacklist,weather
# module deliberately. wordledaily serves /wordle too; the retired name wordle
# still loads it.
MODULES=util,misc,random,amlich,wordledaily,loldle,noitu,lol,stock,gold,coin,stats,monkeyd,sticker,alias,blacklist,weather
# Telegram user id for owner-only commands.
OWNER_ID=
# Comma-separated admin Telegram user ids.
@@ -69,6 +70,13 @@ NOITU_GAME_SECRET=
# docs/wordledaily.md. Secret.
WORDLEDAILY_GAME_SECRET=
# Optional secret (at least 32 bytes) for the loldle game: it signs game links
# and keys the LoLdle Daily champion order. Unset = derived from
# TELEGRAM_BOT_TOKEN. A value shorter than 32 bytes disables the web game; the
# in-chat /loldle commands keep working. Served under
# <GAME_BASE_URL>/games/loldle/. See docs/loldle.md. Secret.
LOLDLE_GAME_SECRET=
# ====================== Leave UNSET on self-host ==================
# Defaults are correct for self-host:
# KV_PROVIDER — auto-selects mongodb because MONGO_URL is set