mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-04-28 02:21:16 +00:00
c0315574c0
Near-clone of the semantle module, adapted for Vietnamese: - Targets from duyet/vietnamese-wordlist Viet22K (~22k entries, GPL). Regenerate via scripts/build-doantu-words.js; chained into npm run build. - ConceptNet client uses /c/vi/<term> URIs; multi-word guesses (e.g. "con chó") are space-to-underscore converted at URL build time so the board keeps the natural display. - lookup.js permits Unicode letters + combining marks + single internal spaces; rejects digits/punctuation. - All three commands (/doantu, /doantu_giveup, /doantu_stats) are visibility=protected — shown in /help, hidden from Telegram's native / autocomplete menu while the module is still experimental. Wired into src/modules/index.js, wrangler.toml MODULES, .env.deploy(.example), and package.json build chain. Separate module rather than a shared base with semantle — matches the repo's one-module-per-game convention (see loldle vs wordle); factor later if a third language appears.
16 lines
739 B
Bash
16 lines
739 B
Bash
# Post-deploy registration env, consumed by `scripts/register.js` via
|
|
# `node --env-file=.env.deploy`. Copy to .env.deploy (gitignored) and fill in.
|
|
#
|
|
# TELEGRAM_BOT_TOKEN + TELEGRAM_WEBHOOK_SECRET must match the values set via
|
|
# `wrangler secret put` so the Worker and Telegram agree on the same secret.
|
|
TELEGRAM_BOT_TOKEN=
|
|
TELEGRAM_WEBHOOK_SECRET=
|
|
|
|
# Public URL of the deployed Worker (no trailing slash). Known after the first
|
|
# `wrangler deploy`. Example: https://miti99bot.your-subdomain.workers.dev
|
|
WORKER_URL=
|
|
|
|
# Same MODULES value as wrangler.toml [vars]. Duplicated here so the register
|
|
# script can derive the public command list without parsing wrangler.toml.
|
|
MODULES=util,wordle,loldle,misc,trading,lolschedule,semantle,doantu
|