mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-04-27 14:20:47 +00:00
3ac06bffaa
Closes deferred phases 04 + 05 of loldle-new-modes plan. - loldle-ability: 5 guesses, DDragon ability icon as photo. State pins slot (P/Q/W/E/R) so the same icon shows every turn. Abilities pulled from DDragon per-champion — same source loldle.net uses at runtime. - loldle-splash: 4 guesses, random skin splash as photo. Skin pool scraped from loldle.net bundle (var Ad=[…] — 172 champs × 1939 skins, non-chroma, matches their splash mode exactly). URLs from Riot DDragon CDN (no version segment, stable across patches). - fetch-ddragon-data.js: extended to write all four JSONs in one run. Shares a single DDragon per-champion fetch cycle (concurrency 10). - Credits loldle.net + Riot Games in all loldle-family READMEs. 19 new tests (503 total). Lint clean. register:dry reports 12 loldle_* commands with no conflicts.
64 lines
2.6 KiB
TOML
64 lines
2.6 KiB
TOML
name = "miti99bot"
|
|
main = "src/index.js"
|
|
compatibility_date = "2025-10-01"
|
|
|
|
# Enabled modules at runtime. Comma-separated. Must match static-map keys in src/modules/index.js.
|
|
# Also duplicate this value into .env.deploy so scripts/register.js derives the same public command list.
|
|
[vars]
|
|
MODULES = "util,wordle,loldle,loldle-emoji,loldle-quote,loldle-ability,loldle-splash,misc,trading,lolschedule,semantle,doantu,twentyq"
|
|
|
|
# KV namespace holding all module state. Each module auto-prefixes its keys via createStore().
|
|
# Production-only — no preview namespace. Create with:
|
|
# wrangler kv namespace create miti99bot-kv
|
|
# then paste the returned id below.
|
|
[[kv_namespaces]]
|
|
binding = "KV"
|
|
id = "f7f190fcb2fa42eb84a05542911334b0"
|
|
|
|
# D1 database for module persistent storage. Each module prefixes its tables
|
|
# with `{moduleName}_` (e.g. `trading_trades`). Migrations are applied via
|
|
# `npm run db:migrate` (chained into `npm run deploy`).
|
|
# Create with: npx wrangler d1 create miti99bot-db
|
|
# then replace REPLACE_ME_D1_UUID below with the returned database_id.
|
|
[[d1_databases]]
|
|
binding = "DB"
|
|
database_name = "miti99bot-db"
|
|
database_id = "261b54e7-0fdb-4fe7-8ed9-2e8a8bcf459c"
|
|
|
|
# Workers AI inference binding, accessed as `env.AI` in handlers.
|
|
# Used by:
|
|
# - semantle / doantu → @cf/baai/bge-m3 multilingual embeddings
|
|
# - twentyq → @cf/google/gemma-4-26b-a4b-it text generation
|
|
# Workers Free plan: 10,000 Neurons/day, hard-stops (no billing on Free).
|
|
# Pricing: https://developers.cloudflare.com/workers-ai/platform/pricing/
|
|
[ai]
|
|
binding = "AI"
|
|
|
|
# Cron Triggers — union of all schedules declared by modules.
|
|
# When adding a module with cron entries, append its schedule(s) here.
|
|
# See docs/adding-a-module.md for the full module author workflow.
|
|
# Local testing: curl "http://localhost:8787/__scheduled?cron=0+1+*+*+*"
|
|
# (requires `wrangler dev --test-scheduled`)
|
|
[triggers]
|
|
crons = ["0 17 * * *", "0 1 * * *"]
|
|
|
|
# Workers Observability — captures console.* logs, request metadata, and
|
|
# invocation traces in the Cloudflare dashboard (Observability → Logs).
|
|
# 200k events/day included on free plan. `head_sampling_rate = 1` keeps
|
|
# all invocations; drop to 0.1 for 10% sampling if volume grows.
|
|
[observability]
|
|
enabled = true
|
|
head_sampling_rate = 1
|
|
|
|
[observability.logs]
|
|
enabled = true
|
|
invocation_logs = true
|
|
|
|
[observability.traces]
|
|
enabled = true
|
|
head_sampling_rate = 1
|
|
|
|
# Secrets (set via `wrangler secret put <name>`, NOT in this file):
|
|
# TELEGRAM_BOT_TOKEN — bot token from @BotFather
|
|
# TELEGRAM_WEBHOOK_SECRET — arbitrary high-entropy string, also set in .env.deploy
|