mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-04-27 16:20:37 +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.
36 lines
1.2 KiB
JSON
36 lines
1.2 KiB
JSON
{
|
|
"name": "miti99bot",
|
|
"version": "0.1.0",
|
|
"description": "Telegram bot with plug-n-play module system, deployed to Cloudflare Workers.",
|
|
"private": true,
|
|
"type": "module",
|
|
"engines": {
|
|
"node": ">=20.6"
|
|
},
|
|
"scripts": {
|
|
"dev": "wrangler dev",
|
|
"build": "npm run build:wordle-data && npm run build:semantle-words && npm run build:doantu-words",
|
|
"build:wordle-data": "node scripts/build-wordle-data.js",
|
|
"build:semantle-words": "node scripts/build-semantle-words.js",
|
|
"build:doantu-words": "node scripts/build-doantu-words.js",
|
|
"scrape:loldle-data": "node scripts/scrape-loldle-data.js",
|
|
"deploy": "npm run build && wrangler deploy && npm run db:migrate && npm run register",
|
|
"db:migrate": "node scripts/migrate.js",
|
|
"register": "node --env-file-if-exists=.env.deploy scripts/register.js",
|
|
"register:dry": "node --env-file-if-exists=.env.deploy scripts/register.js --dry-run",
|
|
"lint": "biome check . && eslint src",
|
|
"format": "biome format --write .",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"grammy": "^1.30.0"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "^1.9.0",
|
|
"eslint": "^10.2.0",
|
|
"eslint-plugin-jsdoc": "^62.9.0",
|
|
"vitest": "^4.1.4",
|
|
"wrangler": "^4.84.0"
|
|
}
|
|
}
|