tiennm99 53ce1113eb feat(modules): port loldle-quote
Phase 6b of the go-port-cloud-run plan. Same shape as loldle-emoji but
with quote-pool data and default 6 guesses (vs emoji's 5).

- internal/modules/loldlequote: champions.go (embed quotes.json),
  state.go (game/stats/config persistence), render.go (italic clue +
  guess list, HTML-escaped), handlers.go (handleQuote / handleGiveup /
  handleStats / handleSetMax), loldlequote.go (Module Factory).
- Reuses internal/modules/util/chathelper and internal/champname so
  the new module adds no helper duplication.
- 4 commands wired in cmd/server/main.go: loldle_quote (public),
  loldle_quote_giveup (public), loldle_quote_stats (public),
  loldle_quote_setmax (private).
- 17 tests: lookup (embed + redaction-marker check), render
  (escapes), state (round-trip + JS-wire-format decode + streak
  sequence), handlers (no-arg / win / unknown / duplicate / giveup /
  stats / setmax owner+nonowner).

go test -race -count=1 ./... clean across all 16 packages;
golangci-lint clean.
2026-05-09 16:45:51 +07:00
2026-05-09 16:45:51 +07:00
2026-05-09 16:45:51 +07:00

miti99bot-go

Plug-n-play Telegram bot framework in Go, deployed on Google Cloud Run with Firestore + Gemini. Free-tier port of miti99bot.

Status

Early scaffolding. See plans/260508-2222-go-port-cloud-run/plan.md for the full roadmap.

Phase What Status
01 GCP setup, Cloud Run baseline pending
02 Repo bootstrap + webhook skeleton partial (local pieces done; Cloud Run deploy deferred to Phase 01)
03 Module framework + KVStore done
04+ Firestore, modules, cron, CI/CD, cutover pending

Layout

cmd/server/             entrypoint
internal/server/        HTTP routes (/, /webhook, /cron/{name})
internal/telegram/      Telegram webhook + bot wrapper
internal/modules/       Module framework, registry, dispatchers
internal/storage/       KVStore interface, in-memory impl, prefix wrapper

Run locally

TELEGRAM_BOT_TOKEN=\
TELEGRAM_WEBHOOK_SECRET=local \
PORT=8080 \
MODULES= \
go run ./cmd/server

End-to-end smoke test against a Telegram dev bot requires ngrok (local) or a Cloud Run deployment. The dev bot is created manually; token is injected via env vars only.

Test

go vet ./...
go test ./...

Build

docker build -t miti99bot-go .

The image is multi-stage (golang:1.23-alpinegcr.io/distroless/static:nonroot); resulting image is ~15 MiB.

License

Apache-2.0.

S
Description
Plug-n-play Telegram bot framework on Cloudflare Workers with grammY. Modules load via env var, three command visibility levels, KV storage behind a swappable interface.
Readme Apache-2.0 3.5 MiB
Languages
Go 98.1%
Makefile 1.5%
Shell 0.3%