diff --git a/.env.example b/.env.example index 3bacad8..aa96b52 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -# miti99bot — self-host (Coolify + MongoDB Atlas) environment. +# tiennm99bot — self-host (Coolify + MongoDB Atlas) environment. # Copy to .env and fill in. .env is gitignored — never commit real secrets. # ============================ Required ============================ @@ -9,7 +9,7 @@ TELEGRAM_BOT_TOKEN=123456:ABC-DEF... # db username + password — treat it as a secret (it is never logged). # Create a least-privilege user: readWrite on this one database only. MONGO_URL=mongodb+srv://botuser:STRONG_UNIQUE_PASSWORD@cluster0.xxxxx.mongodb.net/?retryWrites=true&w=majority -MONGO_DATABASE=miti99bot +MONGO_DATABASE=tiennm99bot # ============================ Operational ========================= # Comma-separated module list. Empty = load every module, including any module @@ -30,7 +30,7 @@ BOT_USERNAME= # MUST end in _by_: Telegram requires that suffix on sets a # bot creates and refuses to edit sets it did not create, so the suffix is what # proves the pack is manageable. Created automatically, owned by OWNER_ID, on -# the first /addsticker if it does not exist yet. Unset = miti99_by_. +# the first /addsticker if it does not exist yet. Unset = stickers_by_. STICKER_PACK_NAME= # SOURCE_COMMIT (commit SHA) is read at startup for the deploynotify owner DM. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48bf68b..4813f69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: run: go build ./... - name: docker build - run: docker build -t miti99bot . + run: docker build -t tiennm99bot . renderer: runs-on: ubuntu-latest @@ -99,4 +99,4 @@ jobs: - run: npm run api:smoke - name: docker build - run: docker build -t miti99bot-renderer . + run: docker build -t tiennm99bot-renderer . diff --git a/AGENTS.md b/AGENTS.md index c5372d6..faa9cb3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ ## Project Context -`miti99bot` is a Go Telegram bot with pluggable modules under +`tiennm99bot` is a Go Telegram bot with pluggable modules under `internal/modules`. Runtime storage is MongoDB when `MONGO_URL` is set and in-memory otherwise, which is what tests and local no-database runs use. Read `README.md` before implementation work. diff --git a/CLAUDE.md b/CLAUDE.md index c8e1266..821bfc0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,4 +1,4 @@ -# miti99bot +# tiennm99bot ## Git diff --git a/README.md b/README.md index 1b1fdf9..4c3cc23 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# miti99bot +# tiennm99bot Plug-n-play Telegram bot framework in Go. Self-hosted on Coolify + MongoDB Atlas via long polling and an in-process cron scheduler. @@ -286,13 +286,13 @@ variable, and [`.env.example`](.env.example) for a template. Persistent MongoDB locally (auto-selected when `MONGO_URL` is set): ```sh -docker run -d --rm --name miti99bot-mongo -p 27017:27017 mongo:8 +docker run -d --rm --name tiennm99bot-mongo -p 27017:27017 mongo:8 ``` Then set `MONGO_URL=mongodb://127.0.0.1:27017` and -`MONGO_DATABASE=miti99bot_dev` using the shell syntax above before running +`MONGO_DATABASE=tiennm99bot_dev` using the shell syntax above before running `go run ./cmd/server`. Stop the local database with -`docker stop miti99bot-mongo`. +`docker stop tiennm99bot-mongo`. MongoDB integration tests use Testcontainers to start MongoDB 8 automatically. Keep Docker Desktop or another compatible Docker daemon running, then use the diff --git a/cmd/server/bot_username_test.go b/cmd/server/bot_username_test.go index fa61bf7..d5ba930 100644 --- a/cmd/server/bot_username_test.go +++ b/cmd/server/bot_username_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) func TestResolveBotUsername(t *testing.T) { diff --git a/cmd/server/command_menu.go b/cmd/server/command_menu.go index a6a659a..127130a 100644 --- a/cmd/server/command_menu.go +++ b/cmd/server/command_menu.go @@ -8,7 +8,7 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules" ) const commandMenuTimeout = 8 * time.Second diff --git a/cmd/server/command_menu_test.go b/cmd/server/command_menu_test.go index 668ead6..04c3fb5 100644 --- a/cmd/server/command_menu_test.go +++ b/cmd/server/command_menu_test.go @@ -9,11 +9,11 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/stock" - moduleutil "github.com/tiennm99/miti99bot/internal/modules/util" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/stock" + moduleutil "github.com/tiennm99/tiennm99bot/internal/modules/util" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) func TestBotCommandMenu_UsesLoadedPublicCommandsInModuleOrder(t *testing.T) { diff --git a/cmd/server/main.go b/cmd/server/main.go index eb5e2d9..7184bbf 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -1,4 +1,4 @@ -// Command server runs miti99bot: it loads configuration from the environment, +// Command server runs tiennm99bot: it loads configuration from the environment, // opens the storage backend, builds the module registry, and then serves // Telegram updates by long polling while an in-process scheduler fires module // crons. A small HTTP server answers the container health check. @@ -19,31 +19,31 @@ import ( "github.com/go-telegram/bot" - "github.com/tiennm99/miti99bot/internal/cron" - "github.com/tiennm99/miti99bot/internal/deploynotify" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/metrics" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/alias" - "github.com/tiennm99/miti99bot/internal/modules/amlich" - "github.com/tiennm99/miti99bot/internal/modules/blacklist" - "github.com/tiennm99/miti99bot/internal/modules/coin" - "github.com/tiennm99/miti99bot/internal/modules/gold" - "github.com/tiennm99/miti99bot/internal/modules/lol" - "github.com/tiennm99/miti99bot/internal/modules/loldle" - "github.com/tiennm99/miti99bot/internal/modules/misc" - "github.com/tiennm99/miti99bot/internal/modules/monkeyd" - "github.com/tiennm99/miti99bot/internal/modules/random" - "github.com/tiennm99/miti99bot/internal/modules/stats" - "github.com/tiennm99/miti99bot/internal/modules/sticker" - "github.com/tiennm99/miti99bot/internal/modules/stock" - "github.com/tiennm99/miti99bot/internal/modules/util" - "github.com/tiennm99/miti99bot/internal/modules/weather" - "github.com/tiennm99/miti99bot/internal/modules/wordle" - "github.com/tiennm99/miti99bot/internal/server" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/systemstate" - "github.com/tiennm99/miti99bot/internal/telegram" + "github.com/tiennm99/tiennm99bot/internal/cron" + "github.com/tiennm99/tiennm99bot/internal/deploynotify" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/metrics" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/alias" + "github.com/tiennm99/tiennm99bot/internal/modules/amlich" + "github.com/tiennm99/tiennm99bot/internal/modules/blacklist" + "github.com/tiennm99/tiennm99bot/internal/modules/coin" + "github.com/tiennm99/tiennm99bot/internal/modules/gold" + "github.com/tiennm99/tiennm99bot/internal/modules/lol" + "github.com/tiennm99/tiennm99bot/internal/modules/loldle" + "github.com/tiennm99/tiennm99bot/internal/modules/misc" + "github.com/tiennm99/tiennm99bot/internal/modules/monkeyd" + "github.com/tiennm99/tiennm99bot/internal/modules/random" + "github.com/tiennm99/tiennm99bot/internal/modules/stats" + "github.com/tiennm99/tiennm99bot/internal/modules/sticker" + "github.com/tiennm99/tiennm99bot/internal/modules/stock" + "github.com/tiennm99/tiennm99bot/internal/modules/util" + "github.com/tiennm99/tiennm99bot/internal/modules/weather" + "github.com/tiennm99/tiennm99bot/internal/modules/wordle" + "github.com/tiennm99/tiennm99bot/internal/server" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/systemstate" + "github.com/tiennm99/tiennm99bot/internal/telegram" ) // gitSHA is the local-build fallback read from the VCS metadata that go build diff --git a/cmd/server/main_test.go b/cmd/server/main_test.go index 3b40077..96fe3e6 100644 --- a/cmd/server/main_test.go +++ b/cmd/server/main_test.go @@ -8,10 +8,10 @@ import ( "strings" "testing" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/stock" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/systemstate" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/stock" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/systemstate" ) func TestResolveCommitSHA(t *testing.T) { diff --git a/compose.yml b/compose.yml index 43b6890..bb535d5 100644 --- a/compose.yml +++ b/compose.yml @@ -3,13 +3,13 @@ services: build: context: . # Or pin a prebuilt image instead of building: - # image: ghcr.io/tiennm99/miti99bot:latest + # image: ghcr.io/tiennm99/tiennm99bot:latest restart: unless-stopped environment: # --- Required --- TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN} # from @BotFather — SECRET MONGO_URL: ${MONGO_URL} # Atlas SRV string incl. credentials — SECRET - MONGO_DATABASE: ${MONGO_DATABASE} # e.g. miti99bot + MONGO_DATABASE: ${MONGO_DATABASE} # e.g. tiennm99bot # --- Optional (commented out; the code falls back to each default) --- # Coolify injects every dashboard variable into each service through its @@ -24,7 +24,7 @@ services: # LOL_PANDASCORE_TOKEN: ${LOL_PANDASCORE_TOKEN:-} # PandaScore token — SECRET; empty = /lol* fetches fail # GOLD_VNAPP_API_KEY: ${GOLD_VNAPP_API_KEY:-} # VNAppMob key — SECRET; empty = fetched and cached in Mongo # BOT_USERNAME: ${BOT_USERNAME:-} # bot username without "@"; empty = getMe at startup - # STICKER_PACK_NAME: ${STICKER_PACK_NAME:-} # /addsticker set; empty = miti99_by_ + # STICKER_PACK_NAME: ${STICKER_PACK_NAME:-} # /addsticker set; empty = stickers_by_ # LOG_LEVEL: ${LOG_LEVEL:-info} # debug|info|warn|error # --- Fixed by this stack (not Coolify settings) --- @@ -50,7 +50,7 @@ services: expose: - "8080" # Coolify's UI health check does not apply to Docker Compose apps; it reads - # this block instead. GET / returns text/plain "miti99bot ok". It proves the + # this block instead. GET / returns text/plain "tiennm99bot ok". It proves the # process is serving, not that Mongo is reachable — see # docs/deploy-coolify-selfhosted.md. busybox wget ships in the Alpine image. healthcheck: diff --git a/docs/deploy-coolify-selfhosted.md b/docs/deploy-coolify-selfhosted.md index 8611800..e1df256 100644 --- a/docs/deploy-coolify-selfhosted.md +++ b/docs/deploy-coolify-selfhosted.md @@ -1,6 +1,6 @@ # Deploy: Self-host (Coolify + MongoDB Atlas) -Run `miti99bot` as a long-lived container on [Coolify](https://coolify.io) with +Run `tiennm99bot` as a long-lived container on [Coolify](https://coolify.io) with [MongoDB Atlas](https://www.mongodb.com/atlas) (free M0) for storage. ## Architecture @@ -30,12 +30,12 @@ Copy [`.env.example`](../.env.example) → `.env` (gitignored) and fill in. |---|---|---| | `TELEGRAM_BOT_TOKEN` | ✅ | from @BotFather; startup fails without it | | `MONGO_URL` | ✅ | Atlas SRV string **incl. credentials** — secret, never logged | -| `MONGO_DATABASE` | ✅ | e.g. `miti99bot` | +| `MONGO_DATABASE` | ✅ | e.g. `tiennm99bot` | | `MODULES` | optional | CSV; empty = all modules, including any added later | | `OWNER_ID` | optional | Telegram user id for owner-only commands, the deploy DM, and the `/addsticker` pack owner. Unset = owner-only commands are denied and `/addsticker` refuses | | `ADMIN_IDS` | optional | CSV of Telegram user ids for admin-only commands | | `BOT_USERNAME` | optional | the bot's Telegram username, without `@`; unset = asked from Telegram (`getMe`) once at startup. Used for the default sticker pack name and the lol User-Agent | -| `STICKER_PACK_NAME` | optional | set `/addsticker` writes to; default `miti99_by_`. See [sticker packs](sticker-packs.md) | +| `STICKER_PACK_NAME` | optional | set `/addsticker` writes to; default `stickers_by_`. See [sticker packs](sticker-packs.md) | | `LOL_PANDASCORE_TOKEN` | optional | PandaScore API token for the lol module (free tier) — secret, never logged; without it every `/lol*` fetch fails (stale cache may still serve briefly) | | `RENDERER_URL` | leave unset | base URL of the animation renderer; fixed by `compose.yml` to the bundled renderer (`http://renderer:3000`), so a Coolify value is ignored | | `LOG_LEVEL` | optional | `debug`, `info` (default), `warn`, or `error`; logs are JSON on stdout | @@ -115,7 +115,7 @@ MP4, with the same text fallback. 1. Create a free **M0** cluster (512 MB — ample for the tiny paper-trading KV). 2. **Database user (least privilege):** create a user with role - **`readWrite` on the single app database only** (e.g. `miti99bot`) — never + **`readWrite` on the single app database only** (e.g. `tiennm99bot`) — never Atlas admin or cluster-wide. Use a **strong unique password**. 3. **Network access:** add `0.0.0.0/0`. @@ -181,7 +181,7 @@ MP4, with the same text fallback. 6. **Health check:** Coolify's UI health-check settings do not apply to Docker Compose apps; Coolify reads each service's `healthcheck:` in `compose.yml` instead. The `bot` service checks `GET /` (returns - `text/plain` `miti99bot ok`) with the image's busybox `wget`, and the + `text/plain` `tiennm99bot ok`) with the image's busybox `wget`, and the `renderer` service checks `/api/healthz`. Note: `/` reports healthy even if Mongo is unreachable (the driver auto-reconnects on the next op); a DB outage will not mark the container unhealthy — accepted trade-off. @@ -246,5 +246,5 @@ endpoint from inside the container: docker compose exec bot wget -qO- http://127.0.0.1:8080/ ``` -It returns `miti99bot ok`. The bot's webhook must be unset (the container +It returns `tiennm99bot ok`. The bot's webhook must be unset (the container clears it on startup) or `getUpdates` 409s. diff --git a/docs/sticker-packs.md b/docs/sticker-packs.md index d800783..87989e3 100644 --- a/docs/sticker-packs.md +++ b/docs/sticker-packs.md @@ -24,7 +24,7 @@ Single-shot: one message replying to the media to add. No conversation state. | Env | Default | Meaning | |---|---|---| -| `STICKER_PACK_NAME` | `miti99_by_` | The Telegram set to write to | +| `STICKER_PACK_NAME` | `stickers_by_` | The Telegram set to write to | | `OWNER_ID` | — | Must be the account that **owns** that set | `OWNER_ID` is reused rather than given a sticker-specific twin because @@ -52,7 +52,7 @@ before any download or API call: **The pack creates itself on first use.** If the set does not exist, the first `/addsticker` creates it — owned by `OWNER_ID`, titled with the slug half of the -name (`miti99_by_examplebot` → *miti99*), and seeded with the sticker that +name (`stickers_by_examplebot` → *stickers*), and seeded with the sticker that triggered it, because Telegram cannot create an empty set. The reply says *"Created the shared pack with this sticker."* diff --git a/go.mod b/go.mod index c8e3893..6b53f9d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/tiennm99/miti99bot +module github.com/tiennm99/tiennm99bot go 1.26.5 diff --git a/internal/cron/scheduler.go b/internal/cron/scheduler.go index cf36560..e0a3751 100644 --- a/internal/cron/scheduler.go +++ b/internal/cron/scheduler.go @@ -11,8 +11,8 @@ import ( "github.com/robfig/cron/v3" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" ) // cronTimeout caps a single in-process cron fire so a slow handler cannot diff --git a/internal/cron/scheduler_test.go b/internal/cron/scheduler_test.go index 52591b4..37e0aec 100644 --- a/internal/cron/scheduler_test.go +++ b/internal/cron/scheduler_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // buildReg builds a registry with a single module exposing one cron whose diff --git a/internal/deploynotify/deploy_notify.go b/internal/deploynotify/deploy_notify.go index 6919fd1..9ae3ef4 100644 --- a/internal/deploynotify/deploy_notify.go +++ b/internal/deploynotify/deploy_notify.go @@ -15,7 +15,7 @@ import ( "github.com/go-telegram/bot" - "github.com/tiennm99/miti99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/log" ) // defaultTimeout caps the whole Run path (Telegram send) so a misbehaving @@ -71,7 +71,7 @@ func skipReason(cfg Config) string { // renderMessage builds the DM text. Keep the format stable so the owner can // search their Telegram history by SHA. func renderMessage(sha string) string { - return fmt.Sprintf("🚀 miti99bot deployed: %s", sha) + return fmt.Sprintf("🚀 tiennm99bot deployed: %s", sha) } // sendMessage routes through Config.Sender when set (tests); otherwise it diff --git a/internal/deploynotify/deploy_notify_test.go b/internal/deploynotify/deploy_notify_test.go index 78b6dd4..6b7bd01 100644 --- a/internal/deploynotify/deploy_notify_test.go +++ b/internal/deploynotify/deploy_notify_test.go @@ -86,7 +86,7 @@ func TestRenderMessage_ContainsSHA(t *testing.T) { if !strings.Contains(got, "deadbeef") { t.Errorf("message %q missing SHA", got) } - if !strings.Contains(got, "miti99bot") { + if !strings.Contains(got, "tiennm99bot") { t.Errorf("message %q missing bot name", got) } } diff --git a/internal/metrics/counters.go b/internal/metrics/counters.go index c26c63f..0fbd700 100644 --- a/internal/metrics/counters.go +++ b/internal/metrics/counters.go @@ -12,7 +12,7 @@ import ( "sync/atomic" "time" - "github.com/tiennm99/miti99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/log" ) // DefaultFlushInterval is how often Run flushes counters to the log. 60s diff --git a/internal/metrics/counters_test.go b/internal/metrics/counters_test.go index 7c9b846..44fc792 100644 --- a/internal/metrics/counters_test.go +++ b/internal/metrics/counters_test.go @@ -8,7 +8,7 @@ import ( "sync" "testing" - logger "github.com/tiennm99/miti99bot/internal/log" + logger "github.com/tiennm99/tiennm99bot/internal/log" ) // captureLogger swaps the package-level logger for one writing to buf and diff --git a/internal/modules/alias/alias.go b/internal/modules/alias/alias.go index 3936acd..a92bade 100644 --- a/internal/modules/alias/alias.go +++ b/internal/modules/alias/alias.go @@ -16,8 +16,8 @@ package alias import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // Alias is one name-to-content binding. diff --git a/internal/modules/alias/alias_inline.go b/internal/modules/alias/alias_inline.go index 8ce70b4..eaadc63 100644 --- a/internal/modules/alias/alias_inline.go +++ b/internal/modules/alias/alias_inline.go @@ -9,7 +9,7 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/log" ) const ( diff --git a/internal/modules/alias/alias_inline_test.go b/internal/modules/alias/alias_inline_test.go index 244cb31..c00aa50 100644 --- a/internal/modules/alias/alias_inline_test.go +++ b/internal/modules/alias/alias_inline_test.go @@ -8,7 +8,7 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // inlineQuery builds an inline-mode update: "@botname " typed in any chat. diff --git a/internal/modules/alias/fallback_test.go b/internal/modules/alias/fallback_test.go index 42c45f4..36fda68 100644 --- a/internal/modules/alias/fallback_test.go +++ b/internal/modules/alias/fallback_test.go @@ -7,10 +7,10 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/alias" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/alias" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // The headline of the fallback: a saved name becomes its own command. @@ -40,9 +40,9 @@ func TestFallback_ToleratesAtBotnameSuffix(t *testing.T) { rb.Reset() // The fixture builder stops the entity at '@', but real Telegram includes - // the whole "/cheer@miti99bot" in it — which is the case the stripping + // the whole "/cheer@tiennm99bot" in it — which is the case the stripping // exists for, so the entity is widened here to match the wire format. - upd := testutil.NewPrivateMessage(7, "/cheer@miti99bot") + upd := testutil.NewPrivateMessage(7, "/cheer@tiennm99bot") upd.Message.Entities[0].Length = len(upd.Message.Text) rb.Bot.ProcessUpdate(context.Background(), upd) diff --git a/internal/modules/alias/handlers.go b/internal/modules/alias/handlers.go index 262bb4a..0998866 100644 --- a/internal/modules/alias/handlers.go +++ b/internal/modules/alias/handlers.go @@ -12,9 +12,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/storage" ) const ( diff --git a/internal/modules/alias/handlers_test.go b/internal/modules/alias/handlers_test.go index 32dc8e3..fd20a5a 100644 --- a/internal/modules/alias/handlers_test.go +++ b/internal/modules/alias/handlers_test.go @@ -8,10 +8,10 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/alias" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/alias" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // installAlias builds a registry holding only the alias module. Every command diff --git a/internal/modules/amlich/amlich.go b/internal/modules/amlich/amlich.go index d79f7c1..8a6a196 100644 --- a/internal/modules/amlich/amlich.go +++ b/internal/modules/amlich/amlich.go @@ -5,7 +5,7 @@ package amlich import ( - "github.com/tiennm99/miti99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules" ) // New is the module Factory. The module is stateless — pure calendar math with diff --git a/internal/modules/amlich/handlers.go b/internal/modules/amlich/handlers.go index 94cdec5..a54363c 100644 --- a/internal/modules/amlich/handlers.go +++ b/internal/modules/amlich/handlers.go @@ -10,8 +10,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // saigonLocation pins "today" for /amlich without an argument. FixedZone (not diff --git a/internal/modules/amlich/handlers_test.go b/internal/modules/amlich/handlers_test.go index b4d6d55..a4df741 100644 --- a/internal/modules/amlich/handlers_test.go +++ b/internal/modules/amlich/handlers_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // installAmlich wires the amlich module to a recording bot. The module is diff --git a/internal/modules/blacklist/blacklist.go b/internal/modules/blacklist/blacklist.go index a32ab2b..87c8831 100644 --- a/internal/modules/blacklist/blacklist.go +++ b/internal/modules/blacklist/blacklist.go @@ -16,8 +16,8 @@ package blacklist import ( - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // Entry is one stored rule. diff --git a/internal/modules/blacklist/handlers.go b/internal/modules/blacklist/handlers.go index 209a423..b6e16bb 100644 --- a/internal/modules/blacklist/handlers.go +++ b/internal/modules/blacklist/handlers.go @@ -13,10 +13,10 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/storage" ) const ( diff --git a/internal/modules/blacklist/handlers_test.go b/internal/modules/blacklist/handlers_test.go index 0746e6d..2219938 100644 --- a/internal/modules/blacklist/handlers_test.go +++ b/internal/modules/blacklist/handlers_test.go @@ -8,10 +8,10 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/blacklist" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/blacklist" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // installBlacklist builds a registry holding only this module. Every command is diff --git a/internal/modules/coin/coin.go b/internal/modules/coin/coin.go index fa3e547..eba6b94 100644 --- a/internal/modules/coin/coin.go +++ b/internal/modules/coin/coin.go @@ -5,8 +5,8 @@ package coin import ( - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // New is the coin paper-trading module factory. Like every module it is diff --git a/internal/modules/coin/handlers.go b/internal/modules/coin/handlers.go index 5bad019..80d79d3 100644 --- a/internal/modules/coin/handlers.go +++ b/internal/modules/coin/handlers.go @@ -8,8 +8,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) var ( diff --git a/internal/modules/coin/handlers_order_test.go b/internal/modules/coin/handlers_order_test.go index 861aa1b..b2ed276 100644 --- a/internal/modules/coin/handlers_order_test.go +++ b/internal/modules/coin/handlers_order_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) func TestHandleBuyAcceptsCoinFirstOrder(t *testing.T) { diff --git a/internal/modules/coin/handlers_test.go b/internal/modules/coin/handlers_test.go index 0928784..de4b4e3 100644 --- a/internal/modules/coin/handlers_test.go +++ b/internal/modules/coin/handlers_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) type fakePriceFetcher struct { diff --git a/internal/modules/coin/helpers.go b/internal/modules/coin/helpers.go index ed1ea8d..d162b47 100644 --- a/internal/modules/coin/helpers.go +++ b/internal/modules/coin/helpers.go @@ -11,9 +11,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/keylock" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/keylock" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) type priceFetcher interface { diff --git a/internal/modules/coin/portfolio.go b/internal/modules/coin/portfolio.go index 7cefb11..d54d47b 100644 --- a/internal/modules/coin/portfolio.go +++ b/internal/modules/coin/portfolio.go @@ -7,7 +7,7 @@ import ( "math" "strconv" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // coinDustEpsilon is the tolerance below which balances and quantities are diff --git a/internal/modules/coin/portfolio_test.go b/internal/modules/coin/portfolio_test.go index c5789d3..22bc261 100644 --- a/internal/modules/coin/portfolio_test.go +++ b/internal/modules/coin/portfolio_test.go @@ -8,7 +8,7 @@ import ( "go.mongodb.org/mongo-driver/v2/bson" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) func TestLoadPortfolioFirstTimeUser(t *testing.T) { diff --git a/internal/modules/coin/price_providers.go b/internal/modules/coin/price_providers.go index fc97b3d..9f4ef08 100644 --- a/internal/modules/coin/price_providers.go +++ b/internal/modules/coin/price_providers.go @@ -258,7 +258,7 @@ func getJSON(ctx context.Context, client *http.Client, endpoint string) (*http.R if err != nil { return nil, fmt.Errorf("build request: %w", err) } - req.Header.Set("User-Agent", "Mozilla/5.0 (miti99bot)") + req.Header.Set("User-Agent", "Mozilla/5.0 (tiennm99bot)") if client == nil { client = &http.Client{Timeout: coinHTTPTimeout} } diff --git a/internal/modules/coin/views.go b/internal/modules/coin/views.go index e2adddb..33aed59 100644 --- a/internal/modules/coin/views.go +++ b/internal/modules/coin/views.go @@ -8,8 +8,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) func (s *state) handleStats(ctx context.Context, b *bot.Bot, update *models.Update) error { diff --git a/internal/modules/coin/views_reply_budget_test.go b/internal/modules/coin/views_reply_budget_test.go index 6cbfa01..fbf49f8 100644 --- a/internal/modules/coin/views_reply_budget_test.go +++ b/internal/modules/coin/views_reply_budget_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // blockingPriceFetcher simulates an upstream that never responds: it blocks diff --git a/internal/modules/dispatcher.go b/internal/modules/dispatcher.go index 9315fd1..e881581 100644 --- a/internal/modules/dispatcher.go +++ b/internal/modules/dispatcher.go @@ -9,8 +9,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/metrics" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/metrics" ) // Auth gates Protected/Private commands by sender Telegram user ID. Public diff --git a/internal/modules/dispatcher_panic_test.go b/internal/modules/dispatcher_panic_test.go index 14980cc..7488c8c 100644 --- a/internal/modules/dispatcher_panic_test.go +++ b/internal/modules/dispatcher_panic_test.go @@ -12,11 +12,11 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/metrics" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/metrics" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // The bot dispatches updates inline on a single polling goroutine diff --git a/internal/modules/dispatcher_test.go b/internal/modules/dispatcher_test.go index 49a609d..298eaf9 100644 --- a/internal/modules/dispatcher_test.go +++ b/internal/modules/dispatcher_test.go @@ -9,7 +9,7 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/log" ) func TestAuth_Permits(t *testing.T) { @@ -89,13 +89,13 @@ func TestMatchCommand(t *testing.T) { // the entity. The upstream library's MatchTypeCommand misses this. name: "group slash-help-at-botname", want: "help", - update: mkUpdate("/help@miti99bot", cmd(0, 15)), + update: mkUpdate("/help@tiennm99bot", cmd(0, 15)), expect: true, }, { name: "group slash-help-at-botname with trailing arg", want: "help", - update: mkUpdate("/help@miti99bot arg", cmd(0, 15)), + update: mkUpdate("/help@tiennm99bot arg", cmd(0, 15)), expect: true, }, { @@ -107,7 +107,7 @@ func TestMatchCommand(t *testing.T) { { name: "different command with botname no match", want: "help", - update: mkUpdate("/info@miti99bot", cmd(0, 15)), + update: mkUpdate("/info@tiennm99bot", cmd(0, 15)), expect: false, }, { @@ -137,7 +137,7 @@ func TestMatchCommand(t *testing.T) { { name: "uppercase command with botname matches", want: "help", - update: mkUpdate("/HELP@miti99bot", cmd(0, 15)), + update: mkUpdate("/HELP@tiennm99bot", cmd(0, 15)), expect: true, }, { diff --git a/internal/modules/gold/composite_prices.go b/internal/modules/gold/composite_prices.go index a46c2d3..2929a8c 100644 --- a/internal/modules/gold/composite_prices.go +++ b/internal/modules/gold/composite_prices.go @@ -3,7 +3,7 @@ package gold import ( "context" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // sjcPriceFetcher is the subset of VNAppMobClient needed by the composite diff --git a/internal/modules/gold/composite_prices_test.go b/internal/modules/gold/composite_prices_test.go index 0ad99e0..22fed69 100644 --- a/internal/modules/gold/composite_prices_test.go +++ b/internal/modules/gold/composite_prices_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // stubVNAppMobClient implements just enough of the VNAppMob client contract diff --git a/internal/modules/gold/gold.go b/internal/modules/gold/gold.go index be45ff6..bb7a1f5 100644 --- a/internal/modules/gold/gold.go +++ b/internal/modules/gold/gold.go @@ -4,7 +4,7 @@ package gold import ( - "github.com/tiennm99/miti99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules" ) // New is the gold paper-trading module factory. It keeps its portfolio state diff --git a/internal/modules/gold/handlers.go b/internal/modules/gold/handlers.go index 2208adf..877b317 100644 --- a/internal/modules/gold/handlers.go +++ b/internal/modules/gold/handlers.go @@ -9,8 +9,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) var ( diff --git a/internal/modules/gold/handlers_test.go b/internal/modules/gold/handlers_test.go index 4ee59f1..57f8906 100644 --- a/internal/modules/gold/handlers_test.go +++ b/internal/modules/gold/handlers_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) type fakePriceFetcher struct { diff --git a/internal/modules/gold/handlers_validation_test.go b/internal/modules/gold/handlers_validation_test.go index ab2e15f..bff8dd6 100644 --- a/internal/modules/gold/handlers_validation_test.go +++ b/internal/modules/gold/handlers_validation_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) func TestHandlersRejectExtraArgs(t *testing.T) { diff --git a/internal/modules/gold/helpers.go b/internal/modules/gold/helpers.go index 6d40b4c..6241011 100644 --- a/internal/modules/gold/helpers.go +++ b/internal/modules/gold/helpers.go @@ -11,10 +11,10 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/keylock" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/keylock" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/storage" ) type priceFetcher interface { diff --git a/internal/modules/gold/portfolio.go b/internal/modules/gold/portfolio.go index 42baaaf..9f3cc51 100644 --- a/internal/modules/gold/portfolio.go +++ b/internal/modules/gold/portfolio.go @@ -7,7 +7,7 @@ import ( "math" "strconv" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // goldDustEpsilon is the tolerance below which balances and quantities are diff --git a/internal/modules/gold/portfolio_test.go b/internal/modules/gold/portfolio_test.go index 5d0e040..32a028d 100644 --- a/internal/modules/gold/portfolio_test.go +++ b/internal/modules/gold/portfolio_test.go @@ -8,8 +8,8 @@ import ( "sync/atomic" "testing" - stockmod "github.com/tiennm99/miti99bot/internal/modules/stock" - "github.com/tiennm99/miti99bot/internal/storage" + stockmod "github.com/tiennm99/tiennm99bot/internal/modules/stock" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // newGoldStore returns a fresh in-memory typed portfolio store for tests. diff --git a/internal/modules/gold/vnappmob_client.go b/internal/modules/gold/vnappmob_client.go index f7d730d..943f35b 100644 --- a/internal/modules/gold/vnappmob_client.go +++ b/internal/modules/gold/vnappmob_client.go @@ -15,8 +15,8 @@ import ( "sync/atomic" "time" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/storage" ) const ( @@ -124,7 +124,7 @@ func (c *VNAppMobClient) fetchSJC(ctx context.Context, key string) (buy, sell fl if err != nil { return 0, 0, fmt.Errorf("vnappmob: build request: %w", err) } - req.Header.Set("User-Agent", "Mozilla/5.0 (miti99bot)") + req.Header.Set("User-Agent", "Mozilla/5.0 (tiennm99bot)") req.Header.Set("Authorization", "Bearer "+key) resp, err := c.httpClient().Do(req) @@ -230,7 +230,7 @@ func (c *VNAppMobClient) refreshKeyLocked(ctx context.Context) error { if err != nil { return fmt.Errorf("vnappmob: build refresh request: %w", err) } - req.Header.Set("User-Agent", "Mozilla/5.0 (miti99bot)") + req.Header.Set("User-Agent", "Mozilla/5.0 (tiennm99bot)") resp, err := c.httpClient().Do(req) if err != nil { diff --git a/internal/modules/gold/vnappmob_client_test.go b/internal/modules/gold/vnappmob_client_test.go index fea7f8c..559e4a7 100644 --- a/internal/modules/gold/vnappmob_client_test.go +++ b/internal/modules/gold/vnappmob_client_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) func newTestVNAppMobClient(srv *httptest.Server, coll storage.Collection) *VNAppMobClient { diff --git a/internal/modules/lol/api_client.go b/internal/modules/lol/api_client.go index 707db1c..0206f82 100644 --- a/internal/modules/lol/api_client.go +++ b/internal/modules/lol/api_client.go @@ -39,8 +39,8 @@ import ( "time" "unicode/utf8" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/storage" ) const ( @@ -51,7 +51,7 @@ const ( // userAgentProduct leads the User-Agent; Client.userAgent appends the // running bot's t.me link when its username is known. - userAgentProduct = "miti99bot/0.1" + userAgentProduct = "tiennm99bot/0.1" // pageSize is PandaScore's per_page maximum; 100 covers a dense day in // one request and a full week in a couple. pageSize = 100 diff --git a/internal/modules/lol/api_client_test.go b/internal/modules/lol/api_client_test.go index 1fcaf17..762832c 100644 --- a/internal/modules/lol/api_client_test.go +++ b/internal/modules/lol/api_client_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // setTestToken puts a dummy PandaScore token in the environment so client @@ -424,10 +424,10 @@ func TestTruncate(t *testing.T) { } func TestClientUserAgent(t *testing.T) { - if got := (&Client{}).userAgent(); got != "miti99bot/0.1" { + if got := (&Client{}).userAgent(); got != "tiennm99bot/0.1" { t.Errorf("no username: got %q", got) } - if got := (&Client{BotUsername: "examplebot"}).userAgent(); got != "miti99bot/0.1 (https://t.me/examplebot)" { + if got := (&Client{BotUsername: "examplebot"}).userAgent(); got != "tiennm99bot/0.1 (https://t.me/examplebot)" { t.Errorf("with username: got %q", got) } } diff --git a/internal/modules/lol/cron.go b/internal/modules/lol/cron.go index 4ac84d4..8fdcdfb 100644 --- a/internal/modules/lol/cron.go +++ b/internal/modules/lol/cron.go @@ -8,9 +8,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/subscription" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/subscription" ) // dailyPushCronName is the cron's registry and in-process scheduler key; it diff --git a/internal/modules/lol/cron_test.go b/internal/modules/lol/cron_test.go index c588b61..de55ed5 100644 --- a/internal/modules/lol/cron_test.go +++ b/internal/modules/lol/cron_test.go @@ -12,9 +12,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/subscription" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/subscription" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // fakeSender records every SendMessage call. errOn returns a transient diff --git a/internal/modules/lol/handlers.go b/internal/modules/lol/handlers.go index 49e66f6..3235ccf 100644 --- a/internal/modules/lol/handlers.go +++ b/internal/modules/lol/handlers.go @@ -9,9 +9,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" - "github.com/tiennm99/miti99bot/internal/modules/util/subscription" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules/util/subscription" ) // state captures everything a lol handler needs at runtime. diff --git a/internal/modules/lol/handlers_test.go b/internal/modules/lol/handlers_test.go index cc5f900..ae4a877 100644 --- a/internal/modules/lol/handlers_test.go +++ b/internal/modules/lol/handlers_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/subscription" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/subscription" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // installSchedule wires the lol module to a recording bot, with a diff --git a/internal/modules/lol/lol.go b/internal/modules/lol/lol.go index 8c47e14..19ef2cc 100644 --- a/internal/modules/lol/lol.go +++ b/internal/modules/lol/lol.go @@ -1,9 +1,9 @@ package lol import ( - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/subscription" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/subscription" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // CollectionName is the MongoDB collection/module key used by the registry. diff --git a/internal/modules/lol/startup.go b/internal/modules/lol/startup.go index 136d0f1..8859027 100644 --- a/internal/modules/lol/startup.go +++ b/internal/modules/lol/startup.go @@ -9,7 +9,7 @@ import ( "go.mongodb.org/mongo-driver/v2/mongo" "go.mongodb.org/mongo-driver/v2/mongo/options" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) const ( diff --git a/internal/modules/lol/startup_mongo_test.go b/internal/modules/lol/startup_mongo_test.go index 45441f4..b401ed4 100644 --- a/internal/modules/lol/startup_mongo_test.go +++ b/internal/modules/lol/startup_mongo_test.go @@ -9,8 +9,8 @@ import ( "go.mongodb.org/mongo-driver/v2/bson" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil/mongotest" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil/mongotest" ) var mongoTests mongotest.Manager @@ -29,7 +29,7 @@ func TestInitStore_MongoCreatesMatchCacheTTLIndex(t *testing.T) { if err != nil { t.Fatalf("NewMongoClient: %v", err) } - dbName := fmt.Sprintf("miti99bot_lol_test_%d", time.Now().UnixNano()) + dbName := fmt.Sprintf("tiennm99bot_lol_test_%d", time.Now().UnixNano()) db := client.Database(dbName) defer func() { cleanupCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second) diff --git a/internal/modules/loldle/handlers.go b/internal/modules/loldle/handlers.go index 859fa7d..8fb7142 100644 --- a/internal/modules/loldle/handlers.go +++ b/internal/modules/loldle/handlers.go @@ -10,8 +10,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/keylock" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/keylock" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) const newRoundHint = "🆕 Send /loldle or /loldle <champion> to start a new round." diff --git a/internal/modules/loldle/handlers_test.go b/internal/modules/loldle/handlers_test.go index 9ecc23a..2594151 100644 --- a/internal/modules/loldle/handlers_test.go +++ b/internal/modules/loldle/handlers_test.go @@ -5,9 +5,9 @@ import ( "strings" "testing" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // installLoldle wires the loldle module + auth (owner gates /loldle_setmax, diff --git a/internal/modules/loldle/loldle.go b/internal/modules/loldle/loldle.go index d646f0f..5a85445 100644 --- a/internal/modules/loldle/loldle.go +++ b/internal/modules/loldle/loldle.go @@ -1,8 +1,8 @@ package loldle import ( - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // New is the loldle module Factory. Loads champions.json once at construction diff --git a/internal/modules/loldle/state.go b/internal/modules/loldle/state.go index 36df0b6..47fd88f 100644 --- a/internal/modules/loldle/state.go +++ b/internal/modules/loldle/state.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // MaxGuesses is the default round length. Per-subject overrides land via diff --git a/internal/modules/loldle/state_test.go b/internal/modules/loldle/state_test.go index 2e1fab2..4fb6518 100644 --- a/internal/modules/loldle/state_test.go +++ b/internal/modules/loldle/state_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) func newLoldleGames() GameStore { diff --git a/internal/modules/loldle/stickers.go b/internal/modules/loldle/stickers.go index 5a5455e..a07a252 100644 --- a/internal/modules/loldle/stickers.go +++ b/internal/modules/loldle/stickers.go @@ -2,7 +2,8 @@ package loldle import "math/rand" -// Sticker file_ids are bot-scoped to @miti99bot. Adding/replacing requires +// Sticker file_ids are bot-scoped to @tiennm99bot. The ids below still come +// from the previous bot account and must be recaptured. Adding/replacing requires // resending the sticker to the bot and capturing the file_id via util's // /stickerid private command. Empty pools are safe — pickSticker returns "" // and handlers skip the SendSticker call. diff --git a/internal/modules/misc/ff_command.go b/internal/modules/misc/ff_command.go index d0d1811..5eb256c 100644 --- a/internal/modules/misc/ff_command.go +++ b/internal/modules/misc/ff_command.go @@ -6,8 +6,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // ffTemplate is the fixed rant /ff replies with. Static text, no substitution — diff --git a/internal/modules/misc/giaxang_command.go b/internal/modules/misc/giaxang_command.go index b8d739d..8bea309 100644 --- a/internal/modules/misc/giaxang_command.go +++ b/internal/modules/misc/giaxang_command.go @@ -20,9 +20,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // petrolimexSearchURL is the CMS search endpoint behind the "Giá bán lẻ xăng diff --git a/internal/modules/misc/giaxang_command_test.go b/internal/modules/misc/giaxang_command_test.go index 04a8dea..2a962f7 100644 --- a/internal/modules/misc/giaxang_command_test.go +++ b/internal/modules/misc/giaxang_command_test.go @@ -7,7 +7,7 @@ import ( "net/http/httptest" "testing" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // petrolimexFixture mirrors the live response shape: records arrive sorted by diff --git a/internal/modules/misc/handlers_test.go b/internal/modules/misc/handlers_test.go index 5183e83..8910604 100644 --- a/internal/modules/misc/handlers_test.go +++ b/internal/modules/misc/handlers_test.go @@ -9,9 +9,9 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // installMisc wires the misc module to a recording bot with a fresh diff --git a/internal/modules/misc/misc.go b/internal/modules/misc/misc.go index 34ed3bc..7998a97 100644 --- a/internal/modules/misc/misc.go +++ b/internal/modules/misc/misc.go @@ -17,10 +17,10 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // lastPingKey is the per-module store key /ping writes and /ping_stats reads. diff --git a/internal/modules/misc/misc_test.go b/internal/modules/misc/misc_test.go index f3c71a2..852665f 100644 --- a/internal/modules/misc/misc_test.go +++ b/internal/modules/misc/misc_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // Store behaviour is tested directly here; Telegram command dispatch is covered diff --git a/internal/modules/misc/xlt1_command.go b/internal/modules/misc/xlt1_command.go index 80b8007..76deb88 100644 --- a/internal/modules/misc/xlt1_command.go +++ b/internal/modules/misc/xlt1_command.go @@ -7,8 +7,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // xlt1Template is the "đơn xin lỗi T1" văn mẫu /xlt1 replies with. Two %s slots, diff --git a/internal/modules/module.go b/internal/modules/module.go index 843ec8f..04372ec 100644 --- a/internal/modules/module.go +++ b/internal/modules/module.go @@ -6,7 +6,7 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // Visibility classifies who may invoke a command. The dispatcher enforces diff --git a/internal/modules/monkeyd/export/export.go b/internal/modules/monkeyd/export/export.go index 847cbc8..351197a 100644 --- a/internal/modules/monkeyd/export/export.go +++ b/internal/modules/monkeyd/export/export.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/tiennm99/miti99bot/internal/modules/monkeyd/crawler" - "github.com/tiennm99/miti99bot/internal/modules/monkeyd/pdf" + "github.com/tiennm99/tiennm99bot/internal/modules/monkeyd/crawler" + "github.com/tiennm99/tiennm99bot/internal/modules/monkeyd/pdf" ) // Defaults the bot advertises to users or reuses in other crawls. diff --git a/internal/modules/monkeyd/export_job.go b/internal/modules/monkeyd/export_job.go index 7542b09..0bd7f4b 100644 --- a/internal/modules/monkeyd/export_job.go +++ b/internal/modules/monkeyd/export_job.go @@ -11,10 +11,10 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules/monkeyd/export" + "github.com/tiennm99/tiennm99bot/internal/modules/monkeyd/export" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) const ( @@ -39,7 +39,7 @@ const ( // cacheDirName is the shared page cache under the system temp directory. // Keeping it outside the per-run directory is what makes a repeat export of the // same novel cost no requests. It is not pruned; a container restart clears it. -const cacheDirName = "miti99bot-monkeyd-cache" +const cacheDirName = "tiennm99bot-monkeyd-cache" // export runs one crawl to completion and delivers the PDF. It is called on its // own goroutine, detached from the Telegram handler context. diff --git a/internal/modules/monkeyd/handlers_test.go b/internal/modules/monkeyd/handlers_test.go index e037d4c..cd06998 100644 --- a/internal/modules/monkeyd/handlers_test.go +++ b/internal/modules/monkeyd/handlers_test.go @@ -9,12 +9,12 @@ import ( "strings" "testing" - "github.com/tiennm99/miti99bot/internal/modules/monkeyd/export" - "github.com/tiennm99/miti99bot/internal/modules/monkeyd/pdf" + "github.com/tiennm99/tiennm99bot/internal/modules/monkeyd/export" + "github.com/tiennm99/tiennm99bot/internal/modules/monkeyd/pdf" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) const testNovelURL = "https://monkeydd.com/tro-lai-nam-thang-cu.html" diff --git a/internal/modules/monkeyd/monkeyd.go b/internal/modules/monkeyd/monkeyd.go index 511877b..b23aeb1 100644 --- a/internal/modules/monkeyd/monkeyd.go +++ b/internal/modules/monkeyd/monkeyd.go @@ -15,10 +15,10 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules/monkeyd/export" + "github.com/tiennm99/tiennm99bot/internal/modules/monkeyd/export" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // commandName is the PDF export command; tagsCommandName is the other one. diff --git a/internal/modules/monkeyd/tags_command.go b/internal/modules/monkeyd/tags_command.go index 9d225f5..a32f2b7 100644 --- a/internal/modules/monkeyd/tags_command.go +++ b/internal/modules/monkeyd/tags_command.go @@ -12,12 +12,12 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules/monkeyd/crawler" - "github.com/tiennm99/miti99bot/internal/modules/monkeyd/export" + "github.com/tiennm99/tiennm99bot/internal/modules/monkeyd/crawler" + "github.com/tiennm99/tiennm99bot/internal/modules/monkeyd/export" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // tagsCommandName is the command that reports a novel's tags. diff --git a/internal/modules/monkeyd/tags_command_test.go b/internal/modules/monkeyd/tags_command_test.go index 89d8cb5..4befc7a 100644 --- a/internal/modules/monkeyd/tags_command_test.go +++ b/internal/modules/monkeyd/tags_command_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // stubTags returns a fetcher yielding fixed tags and records the URL it saw. diff --git a/internal/modules/random/gacha_command.go b/internal/modules/random/gacha_command.go index 86448e8..8206343 100644 --- a/internal/modules/random/gacha_command.go +++ b/internal/modules/random/gacha_command.go @@ -11,9 +11,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) const ( diff --git a/internal/modules/random/gacha_command_test.go b/internal/modules/random/gacha_command_test.go index e27a733..6d7f4f4 100644 --- a/internal/modules/random/gacha_command_test.go +++ b/internal/modules/random/gacha_command_test.go @@ -8,7 +8,7 @@ import ( "reflect" "testing" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) var mp4Bytes = []byte("\x00\x00\x00\x18ftypisom-remote") diff --git a/internal/modules/random/handlers_test.go b/internal/modules/random/handlers_test.go index 64a88e3..48a7048 100644 --- a/internal/modules/random/handlers_test.go +++ b/internal/modules/random/handlers_test.go @@ -9,9 +9,9 @@ import ( "strings" "testing" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // installRandom wires the random module to a recording bot with a fresh diff --git a/internal/modules/random/random.go b/internal/modules/random/random.go index 935fede..0487181 100644 --- a/internal/modules/random/random.go +++ b/internal/modules/random/random.go @@ -5,7 +5,7 @@ // fall back to a text reply without it. package random -import "github.com/tiennm99/miti99bot/internal/modules" +import "github.com/tiennm99/tiennm99bot/internal/modules" // New is the module Factory. The commands keep no state, so deps is unused. func New(_ modules.Deps) modules.Module { diff --git a/internal/modules/random/random_picker.go b/internal/modules/random/random_picker.go index 5b5038c..3f30fee 100644 --- a/internal/modules/random/random_picker.go +++ b/internal/modules/random/random_picker.go @@ -8,8 +8,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) const randomUsage = "Usage: /random " diff --git a/internal/modules/random/random_test.go b/internal/modules/random/random_test.go index 9a4a5bb..91be449 100644 --- a/internal/modules/random/random_test.go +++ b/internal/modules/random/random_test.go @@ -3,8 +3,8 @@ package random import ( "testing" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" ) func TestNew_RegistersRandomGroup(t *testing.T) { diff --git a/internal/modules/random/wheelofnames_command.go b/internal/modules/random/wheelofnames_command.go index 3d6252d..54df767 100644 --- a/internal/modules/random/wheelofnames_command.go +++ b/internal/modules/random/wheelofnames_command.go @@ -10,9 +10,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) const ( diff --git a/internal/modules/registry.go b/internal/modules/registry.go index 6cceac1..9243fd1 100644 --- a/internal/modules/registry.go +++ b/internal/modules/registry.go @@ -10,7 +10,7 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // moduleNameRe is intentionally looser than commandNameRe — it allows hyphen diff --git a/internal/modules/registry_test.go b/internal/modules/registry_test.go index aa05b54..3553ecf 100644 --- a/internal/modules/registry_test.go +++ b/internal/modules/registry_test.go @@ -9,7 +9,7 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) func noopCmd(name string) Command { diff --git a/internal/modules/stats/startup.go b/internal/modules/stats/startup.go index 576b0d3..47dda85 100644 --- a/internal/modules/stats/startup.go +++ b/internal/modules/stats/startup.go @@ -10,8 +10,8 @@ import ( "go.mongodb.org/mongo-driver/v2/mongo" "go.mongodb.org/mongo-driver/v2/mongo/options" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/systemstate" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/systemstate" ) // The retired stock_dividend command's usage rows are soft-deleted (marked diff --git a/internal/modules/stats/startup_mongo_test.go b/internal/modules/stats/startup_mongo_test.go index b049bb0..8ac89ee 100644 --- a/internal/modules/stats/startup_mongo_test.go +++ b/internal/modules/stats/startup_mongo_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/systemstate" - "github.com/tiennm99/miti99bot/internal/testutil/mongotest" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/systemstate" + "github.com/tiennm99/tiennm99bot/internal/testutil/mongotest" ) var mongoTests mongotest.Manager @@ -126,7 +126,7 @@ func setupMongoStatsTest(t *testing.T) (context.Context, storage.Collection, sto if err != nil { t.Fatalf("NewMongoClient: %v", err) } - dbName := fmt.Sprintf("miti99bot_stats_test_%d", time.Now().UnixNano()) + dbName := fmt.Sprintf("tiennm99bot_stats_test_%d", time.Now().UnixNano()) db := client.Database(dbName) t.Cleanup(func() { cleanupCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second) diff --git a/internal/modules/stats/startup_test.go b/internal/modules/stats/startup_test.go index da26894..8f91e3d 100644 --- a/internal/modules/stats/startup_test.go +++ b/internal/modules/stats/startup_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/systemstate" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/systemstate" ) func TestInitStoreMarksStockDividendStatsDeletedAndRetainsHistory(t *testing.T) { diff --git a/internal/modules/stats/stats.go b/internal/modules/stats/stats.go index 00f7690..9fd50f2 100644 --- a/internal/modules/stats/stats.go +++ b/internal/modules/stats/stats.go @@ -13,9 +13,9 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // topK caps the rows every /stats view shows. diff --git a/internal/modules/stats/stats_test.go b/internal/modules/stats/stats_test.go index a7abed4..e0d84a1 100644 --- a/internal/modules/stats/stats_test.go +++ b/internal/modules/stats/stats_test.go @@ -9,9 +9,9 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // newStatsCounter returns a fresh counter backed by an in-memory collection. diff --git a/internal/modules/stats/usage_store.go b/internal/modules/stats/usage_store.go index 401b7df..5db42c0 100644 --- a/internal/modules/stats/usage_store.go +++ b/internal/modules/stats/usage_store.go @@ -11,7 +11,7 @@ import ( "go.mongodb.org/mongo-driver/v2/mongo" "go.mongodb.org/mongo-driver/v2/mongo/options" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) func bsonField(key string, value any) bson.E { diff --git a/internal/modules/stats/views.go b/internal/modules/stats/views.go index a64dc3a..8d4c3a0 100644 --- a/internal/modules/stats/views.go +++ b/internal/modules/stats/views.go @@ -9,9 +9,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // telegramMaxLen leaves margin below Telegram's 4096-character message limit. @@ -79,7 +79,7 @@ func renderStats(ctx context.Context, c *counter, args string) string { // parseSubargs returns the message text after the /stats command token, // stripped of the @botname suffix and leading whitespace. Mirrors the -// entity-stripping logic in dispatcher.matchCommand so /stats@miti99bot users +// entity-stripping logic in dispatcher.matchCommand so /stats@tiennm99bot users // behaves like /stats users in groups. func parseSubargs(update *models.Update) string { msg := update.Message diff --git a/internal/modules/sticker/addsticker_command.go b/internal/modules/sticker/addsticker_command.go index 2f9b4b2..d14a76e 100644 --- a/internal/modules/sticker/addsticker_command.go +++ b/internal/modules/sticker/addsticker_command.go @@ -8,8 +8,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // usageAddSticker is the "you must reply to something" line. diff --git a/internal/modules/sticker/addsticker_command_test.go b/internal/modules/sticker/addsticker_command_test.go index 95ab8d8..a9a30ef 100644 --- a/internal/modules/sticker/addsticker_command_test.go +++ b/internal/modules/sticker/addsticker_command_test.go @@ -7,10 +7,10 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/sticker" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/sticker" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // installSticker builds a registry holding only the sticker module. /addsticker @@ -105,7 +105,7 @@ func TestAddSticker_DefaultPackFollowsBotUsername(t *testing.T) { if !ok { t.Fatalf("no addStickerToSet call; got %+v", rb.Sent()) } - if got := call.Form["name"]; got != "miti99_by_otherbot" { + if got := call.Form["name"]; got != "stickers_by_otherbot" { t.Errorf("name = %q, want the default pack for @otherbot", got) } } @@ -133,7 +133,7 @@ func TestAddSticker_SeededUsernameSkipsGetMe(t *testing.T) { if !ok { t.Fatalf("no addStickerToSet call; got %+v", rb.Sent()) } - if got := call.Form["name"]; got != "miti99_by_seededbot" { + if got := call.Form["name"]; got != "stickers_by_seededbot" { t.Errorf("name = %q, want the default pack for @seededbot", got) } } diff --git a/internal/modules/sticker/startup.go b/internal/modules/sticker/startup.go index e7215b7..f02ae84 100644 --- a/internal/modules/sticker/startup.go +++ b/internal/modules/sticker/startup.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/systemstate" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/systemstate" ) const legacyPackCleanupMarkerKey = "migration:sticker-drop-legacy-packs-v1" diff --git a/internal/modules/sticker/startup_test.go b/internal/modules/sticker/startup_test.go index e706b55..61e8718 100644 --- a/internal/modules/sticker/startup_test.go +++ b/internal/modules/sticker/startup_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/systemstate" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/systemstate" ) // legacyShape stands in for the retired records: a pack keyed by owner ID, a diff --git a/internal/modules/sticker/sticker.go b/internal/modules/sticker/sticker.go index 429a31f..4578c48 100644 --- a/internal/modules/sticker/sticker.go +++ b/internal/modules/sticker/sticker.go @@ -8,7 +8,7 @@ package sticker import ( - "github.com/tiennm99/miti99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules" ) // CollectionName is this module's registry key. Exported so main can hand the diff --git a/internal/modules/sticker/sticker_download.go b/internal/modules/sticker/sticker_download.go index d3ba87d..ea1980a 100644 --- a/internal/modules/sticker/sticker_download.go +++ b/internal/modules/sticker/sticker_download.go @@ -11,7 +11,7 @@ import ( "github.com/go-telegram/bot" - "github.com/tiennm99/miti99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/log" ) const ( diff --git a/internal/modules/sticker/sticker_image.go b/internal/modules/sticker/sticker_image.go index 19aefb2..1fb836e 100644 --- a/internal/modules/sticker/sticker_image.go +++ b/internal/modules/sticker/sticker_image.go @@ -14,7 +14,7 @@ import ( "golang.org/x/image/draw" _ "golang.org/x/image/webp" // read-only WEBP decoder - "github.com/tiennm99/miti99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/log" ) const ( diff --git a/internal/modules/sticker/sticker_pack.go b/internal/modules/sticker/sticker_pack.go index cf3ada8..4a29b66 100644 --- a/internal/modules/sticker/sticker_pack.go +++ b/internal/modules/sticker/sticker_pack.go @@ -12,8 +12,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) const ( @@ -26,7 +26,7 @@ const ( // defaultStickerPackSlug names the shared pack used when the env is unset. // The full name is this slug plus "_by_", so the default // follows whichever bot runs the code. - defaultStickerPackSlug = "miti99" + defaultStickerPackSlug = "stickers" // stickerPackOwnerEnv reuses the bot-wide owner setting rather than // introducing a second variable: AddStickerToSet needs the *set owner's* @@ -76,7 +76,7 @@ const ( // stickerPack is the resolved target of /addsticker. type stickerPack struct { - Name string // Telegram set name, e.g. "miti99_by_examplebot"; empty until defaulted + Name string // Telegram set name, e.g. "stickers_by_examplebot"; empty until defaulted OwnerID int64 // the account the set belongs to; AddStickerToSet demands it } diff --git a/internal/modules/sticker/sticker_pack_test.go b/internal/modules/sticker/sticker_pack_test.go index f806acf..cd4edad 100644 --- a/internal/modules/sticker/sticker_pack_test.go +++ b/internal/modules/sticker/sticker_pack_test.go @@ -19,9 +19,9 @@ func TestPackTitle(t *testing.T) { }{ { name: "slug half becomes the title", - packName: "miti99_by_miti99bot", - username: "miti99bot", - wantTitle: "miti99", + packName: "stickers_by_tiennm99bot", + username: "tiennm99bot", + wantTitle: "stickers", }, { // Telegram documents as case insensitive, and diff --git a/internal/modules/sticker/sticker_video.go b/internal/modules/sticker/sticker_video.go index 4aa6fe2..906907c 100644 --- a/internal/modules/sticker/sticker_video.go +++ b/internal/modules/sticker/sticker_video.go @@ -11,7 +11,7 @@ import ( "strconv" "time" - "github.com/tiennm99/miti99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/log" ) const ( diff --git a/internal/modules/stock/dividend_callback.go b/internal/modules/stock/dividend_callback.go index 2fe178a..d1c044a 100644 --- a/internal/modules/stock/dividend_callback.go +++ b/internal/modules/stock/dividend_callback.go @@ -9,9 +9,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/storage" ) func answerDividendCallback(ctx context.Context, b *bot.Bot, queryID, text string, alert bool) error { diff --git a/internal/modules/stock/dividend_flow_test.go b/internal/modules/stock/dividend_flow_test.go index cff935e..1c1bf8c 100644 --- a/internal/modules/stock/dividend_flow_test.go +++ b/internal/modules/stock/dividend_flow_test.go @@ -12,8 +12,8 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) type dividendProviderCall struct { diff --git a/internal/modules/stock/dividend_notifications.go b/internal/modules/stock/dividend_notifications.go index 4915086..41ee277 100644 --- a/internal/modules/stock/dividend_notifications.go +++ b/internal/modules/stock/dividend_notifications.go @@ -15,8 +15,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) const ( diff --git a/internal/modules/stock/handlers.go b/internal/modules/stock/handlers.go index ea45021..b012f33 100644 --- a/internal/modules/stock/handlers.go +++ b/internal/modules/stock/handlers.go @@ -12,9 +12,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/keylock" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/keylock" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // state is the per-module runtime. store and pending are typed views of the diff --git a/internal/modules/stock/handlers_test.go b/internal/modules/stock/handlers_test.go index 10eea58..b0edf6f 100644 --- a/internal/modules/stock/handlers_test.go +++ b/internal/modules/stock/handlers_test.go @@ -11,9 +11,9 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) func TestModuleRegistersExpectedCommands(t *testing.T) { diff --git a/internal/modules/stock/pending_dividend.go b/internal/modules/stock/pending_dividend.go index 2931ead..d507a64 100644 --- a/internal/modules/stock/pending_dividend.go +++ b/internal/modules/stock/pending_dividend.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) const ( diff --git a/internal/modules/stock/portfolio.go b/internal/modules/stock/portfolio.go index 1442a13..4016ee3 100644 --- a/internal/modules/stock/portfolio.go +++ b/internal/modules/stock/portfolio.go @@ -7,7 +7,7 @@ import ( "math" "strconv" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // Store is the typed view of the module collection that holds portfolios. diff --git a/internal/modules/stock/portfolio_test.go b/internal/modules/stock/portfolio_test.go index 58ea1c2..7d72b15 100644 --- a/internal/modules/stock/portfolio_test.go +++ b/internal/modules/stock/portfolio_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) func newStockStore() Store { diff --git a/internal/modules/stock/prices_ssi.go b/internal/modules/stock/prices_ssi.go index 876c98d..1ccf7b9 100644 --- a/internal/modules/stock/prices_ssi.go +++ b/internal/modules/stock/prices_ssi.go @@ -149,7 +149,7 @@ func newSSIRequest(ctx context.Context, method, full string, body io.Reader) (*h req.Header.Set("Accept", "application/json") req.Header.Set("Origin", "https://iboard.ssi.com.vn") req.Header.Set("Referer", "https://iboard.ssi.com.vn/") - req.Header.Set("User-Agent", "Mozilla/5.0 (miti99bot)") + req.Header.Set("User-Agent", "Mozilla/5.0 (tiennm99bot)") return req, nil } diff --git a/internal/modules/stock/prices_test.go b/internal/modules/stock/prices_test.go index b7f487a..8036458 100644 --- a/internal/modules/stock/prices_test.go +++ b/internal/modules/stock/prices_test.go @@ -63,8 +63,8 @@ func TestPriceClient_FetchSSIQuoteOneRequest(t *testing.T) { t.Errorf("%s = %q, want %q", header, got, want) } } - if got := r.Header.Get("User-Agent"); !strings.Contains(got, "miti99bot") { - t.Errorf("User-Agent = %q, want miti99bot", got) + if got := r.Header.Get("User-Agent"); !strings.Contains(got, "tiennm99bot") { + t.Errorf("User-Agent = %q, want tiennm99bot", got) } w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{"data":{ diff --git a/internal/modules/stock/startup.go b/internal/modules/stock/startup.go index 80b80fc..95bdfd7 100644 --- a/internal/modules/stock/startup.go +++ b/internal/modules/stock/startup.go @@ -6,9 +6,9 @@ import ( "fmt" "time" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/systemstate" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/systemstate" ) const ( diff --git a/internal/modules/stock/startup_mongo_test.go b/internal/modules/stock/startup_mongo_test.go index 23d61e3..c038ea9 100644 --- a/internal/modules/stock/startup_mongo_test.go +++ b/internal/modules/stock/startup_mongo_test.go @@ -9,9 +9,9 @@ import ( "go.mongodb.org/mongo-driver/v2/bson" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/systemstate" - "github.com/tiennm99/miti99bot/internal/testutil/mongotest" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/systemstate" + "github.com/tiennm99/tiennm99bot/internal/testutil/mongotest" ) var stockMongoTests mongotest.Manager @@ -76,7 +76,7 @@ func setupMongoStockMigrationTest(t *testing.T) (context.Context, storage.Collec if err != nil { t.Fatal(err) } - db := client.Database(fmt.Sprintf("miti99bot_stock_migration_test_%d", time.Now().UnixNano())) + db := client.Database(fmt.Sprintf("tiennm99bot_stock_migration_test_%d", time.Now().UnixNano())) t.Cleanup(func() { cleanupCtx, cleanupCancel := context.WithTimeout(context.Background(), 10*time.Second) defer cleanupCancel() diff --git a/internal/modules/stock/startup_test.go b/internal/modules/stock/startup_test.go index 82f6781..c4340e4 100644 --- a/internal/modules/stock/startup_test.go +++ b/internal/modules/stock/startup_test.go @@ -5,8 +5,8 @@ import ( "errors" "testing" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/systemstate" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/systemstate" ) func legacyCursor(value int64) *int64 { return &value } diff --git a/internal/modules/stock/stats_test.go b/internal/modules/stock/stats_test.go index 091a585..090b44a 100644 --- a/internal/modules/stock/stats_test.go +++ b/internal/modules/stock/stats_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) func TestHandleStats_UsesSSIBatchPrices(t *testing.T) { diff --git a/internal/modules/stock/stock.go b/internal/modules/stock/stock.go index cb2f7c4..cf29976 100644 --- a/internal/modules/stock/stock.go +++ b/internal/modules/stock/stock.go @@ -12,8 +12,8 @@ package stock import ( - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // New is the stock module Factory. It registers nine public commands plus the diff --git a/internal/modules/stock/stock_events.go b/internal/modules/stock/stock_events.go index c2ea32a..c9b194e 100644 --- a/internal/modules/stock/stock_events.go +++ b/internal/modules/stock/stock_events.go @@ -12,8 +12,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) const ( diff --git a/internal/modules/stock/stock_events_test.go b/internal/modules/stock/stock_events_test.go index 32167b8..f6f0318 100644 --- a/internal/modules/stock/stock_events_test.go +++ b/internal/modules/stock/stock_events_test.go @@ -8,7 +8,7 @@ import ( "time" "unicode/utf8" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) type stockEventProviderFunc func(context.Context, string, time.Time, time.Time) ([]SSIStockEvent, error) diff --git a/internal/modules/stock/stock_info.go b/internal/modules/stock/stock_info.go index e4c8b1b..deafd56 100644 --- a/internal/modules/stock/stock_info.go +++ b/internal/modules/stock/stock_info.go @@ -10,8 +10,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) const ( diff --git a/internal/modules/stock/stock_info_test.go b/internal/modules/stock/stock_info_test.go index e17d744..f3bb4df 100644 --- a/internal/modules/stock/stock_info_test.go +++ b/internal/modules/stock/stock_info_test.go @@ -10,7 +10,7 @@ import ( "testing" "unicode/utf8" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) func newStockInfoTestState(t *testing.T, ssiHandler http.HandlerFunc) (*state, *int, *int) { diff --git a/internal/modules/util/chathelper/chathelper_test.go b/internal/modules/util/chathelper/chathelper_test.go index ed81a68..4380c8f 100644 --- a/internal/modules/util/chathelper/chathelper_test.go +++ b/internal/modules/util/chathelper/chathelper_test.go @@ -8,7 +8,7 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) func TestFetchContext(t *testing.T) { diff --git a/internal/modules/util/handlers_test.go b/internal/modules/util/handlers_test.go index 5916a0f..eada5b1 100644 --- a/internal/modules/util/handlers_test.go +++ b/internal/modules/util/handlers_test.go @@ -7,10 +7,10 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // installUtil builds a registry with the util module + auth that admits the diff --git a/internal/modules/util/help.go b/internal/modules/util/help.go index d262fb2..735ed75 100644 --- a/internal/modules/util/help.go +++ b/internal/modules/util/help.go @@ -10,10 +10,10 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules" ) -const repoURL = "https://github.com/tiennm99/miti99bot" +const repoURL = "https://github.com/tiennm99/tiennm99bot" var supportFooter = fmt.Sprintf( `Enjoying the bot? Support me by starring the repo: %s`, diff --git a/internal/modules/util/help_test.go b/internal/modules/util/help_test.go index 759955d..e8e525a 100644 --- a/internal/modules/util/help_test.go +++ b/internal/modules/util/help_test.go @@ -9,9 +9,9 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // helpTestNoop is a stand-in handler used only to satisfy the registry's @@ -59,7 +59,7 @@ func TestRenderHelp_GroupsByModuleAndSkipsNonPublic(t *testing.T) { // Locks html.EscapeString contract: & → &, " → ". "Tom & "Jerry"", // Support footer always present. - "github.com/tiennm99/miti99bot", + "github.com/tiennm99/tiennm99bot", } { if !strings.Contains(out, want) { t.Errorf("output missing %q\n---output---\n%s", want, out) @@ -162,7 +162,7 @@ func TestRenderHelp_NilRegistryReturnsFooterOnly(t *testing.T) { if !strings.Contains(out, "no commands registered") { t.Errorf("nil registry should render placeholder; got:\n%s", out) } - if !strings.Contains(out, "github.com/tiennm99/miti99bot") { + if !strings.Contains(out, "github.com/tiennm99/tiennm99bot") { t.Errorf("footer missing; got:\n%s", out) } } diff --git a/internal/modules/util/info.go b/internal/modules/util/info.go index a532fc5..0b1878c 100644 --- a/internal/modules/util/info.go +++ b/internal/modules/util/info.go @@ -7,8 +7,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // infoCommand returns /info — replies plain text with chat / thread / sender diff --git a/internal/modules/util/stickerid.go b/internal/modules/util/stickerid.go index 0e457b4..488312f 100644 --- a/internal/modules/util/stickerid.go +++ b/internal/modules/util/stickerid.go @@ -9,8 +9,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) const stickerIDUsage = "Reply to a sticker message with /stickerid to get its file_id.\n" + diff --git a/internal/modules/util/subscription/push.go b/internal/modules/util/subscription/push.go index 06500ab..a184430 100644 --- a/internal/modules/util/subscription/push.go +++ b/internal/modules/util/subscription/push.go @@ -10,8 +10,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // TerminalKind classifies a permanent send failure by blast radius. diff --git a/internal/modules/util/subscription/subscription.go b/internal/modules/util/subscription/subscription.go index 1fe48d9..58326d9 100644 --- a/internal/modules/util/subscription/subscription.go +++ b/internal/modules/util/subscription/subscription.go @@ -11,7 +11,7 @@ import ( "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // Key is the store slot holding a module's subscriber list. diff --git a/internal/modules/util/subscription/subscription_test.go b/internal/modules/util/subscription/subscription_test.go index c0355c0..3105072 100644 --- a/internal/modules/util/subscription/subscription_test.go +++ b/internal/modules/util/subscription/subscription_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) func newStore() Store { diff --git a/internal/modules/util/util.go b/internal/modules/util/util.go index 97d51c2..e3621cf 100644 --- a/internal/modules/util/util.go +++ b/internal/modules/util/util.go @@ -4,7 +4,7 @@ package util import ( - "github.com/tiennm99/miti99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules" ) // New is the module Factory. /help closes over deps.Registry so it renders diff --git a/internal/modules/weather/flood_push.go b/internal/modules/weather/flood_push.go index fc0ba14..d939623 100644 --- a/internal/modules/weather/flood_push.go +++ b/internal/modules/weather/flood_push.go @@ -11,10 +11,10 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" - "github.com/tiennm99/miti99bot/internal/modules/util/subscription" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules/util/subscription" ) const ( diff --git a/internal/modules/weather/flood_test.go b/internal/modules/weather/flood_test.go index 4410137..5209ae5 100644 --- a/internal/modules/weather/flood_test.go +++ b/internal/modules/weather/flood_test.go @@ -14,10 +14,10 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/subscription" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/subscription" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // floodNow is 2026-10-02 12:00 ICT, the day of the bulletin fixture. diff --git a/internal/modules/weather/weather.go b/internal/modules/weather/weather.go index f59aa8a..8a3d643 100644 --- a/internal/modules/weather/weather.go +++ b/internal/modules/weather/weather.go @@ -17,11 +17,11 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/log" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" - "github.com/tiennm99/miti99bot/internal/modules/util/subscription" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/modules/util/subscription" + "github.com/tiennm99/tiennm99bot/internal/storage" ) const ( diff --git a/internal/modules/weather/weather_test.go b/internal/modules/weather/weather_test.go index fe80185..6ec2643 100644 --- a/internal/modules/weather/weather_test.go +++ b/internal/modules/weather/weather_test.go @@ -8,9 +8,9 @@ import ( "sync/atomic" "testing" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // forecastFixture mirrors a live Open-Meteo response for Ho Chi Minh City. diff --git a/internal/modules/wordle/handlers.go b/internal/modules/wordle/handlers.go index 0dde494..6bc88f0 100644 --- a/internal/modules/wordle/handlers.go +++ b/internal/modules/wordle/handlers.go @@ -8,8 +8,8 @@ import ( "github.com/go-telegram/bot" "github.com/go-telegram/bot/models" - "github.com/tiennm99/miti99bot/internal/keylock" - "github.com/tiennm99/miti99bot/internal/modules/util/chathelper" + "github.com/tiennm99/tiennm99bot/internal/keylock" + "github.com/tiennm99/tiennm99bot/internal/modules/util/chathelper" ) // state captures everything a wordle command needs at handler-time. Built diff --git a/internal/modules/wordle/handlers_test.go b/internal/modules/wordle/handlers_test.go index 2827281..ffb506e 100644 --- a/internal/modules/wordle/handlers_test.go +++ b/internal/modules/wordle/handlers_test.go @@ -5,9 +5,9 @@ import ( "strings" "testing" - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" - "github.com/tiennm99/miti99bot/internal/testutil" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/testutil" ) // installWordle wires the wordle module to a recording bot with an diff --git a/internal/modules/wordle/state.go b/internal/modules/wordle/state.go index b5be2d5..f59720e 100644 --- a/internal/modules/wordle/state.go +++ b/internal/modules/wordle/state.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // MaxGuesses is the standard wordle round length. diff --git a/internal/modules/wordle/state_test.go b/internal/modules/wordle/state_test.go index 1007f77..cb4eebd 100644 --- a/internal/modules/wordle/state_test.go +++ b/internal/modules/wordle/state_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) func newWordleGames() GameStore { diff --git a/internal/modules/wordle/wordle.go b/internal/modules/wordle/wordle.go index 9574b8f..1043d9f 100644 --- a/internal/modules/wordle/wordle.go +++ b/internal/modules/wordle/wordle.go @@ -1,8 +1,8 @@ package wordle import ( - "github.com/tiennm99/miti99bot/internal/modules" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/modules" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // New is the wordle module Factory. Loads the embedded dictionary once, diff --git a/internal/server/health.go b/internal/server/health.go index 6b588e5..e93e4c8 100644 --- a/internal/server/health.go +++ b/internal/server/health.go @@ -17,6 +17,6 @@ func HealthHandler() http.HandlerFunc { return } w.Header().Set("Content-Type", "text/plain; charset=utf-8") - _, _ = w.Write([]byte("miti99bot ok\n")) + _, _ = w.Write([]byte("tiennm99bot ok\n")) } } diff --git a/internal/server/log_middleware.go b/internal/server/log_middleware.go index 6acb4a5..edfeb56 100644 --- a/internal/server/log_middleware.go +++ b/internal/server/log_middleware.go @@ -5,7 +5,7 @@ import ( "runtime/debug" "time" - "github.com/tiennm99/miti99bot/internal/log" + "github.com/tiennm99/tiennm99bot/internal/log" ) // statusRecorder wraps http.ResponseWriter to capture the final status diff --git a/internal/server/log_middleware_test.go b/internal/server/log_middleware_test.go index 042db9e..e3615fe 100644 --- a/internal/server/log_middleware_test.go +++ b/internal/server/log_middleware_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - logger "github.com/tiennm99/miti99bot/internal/log" + logger "github.com/tiennm99/tiennm99bot/internal/log" ) // captureLogger swaps the package-level logger for one writing to buf and diff --git a/internal/storage/mongo_doc_store_test.go b/internal/storage/mongo_doc_store_test.go index f87f4e3..2b3115d 100644 --- a/internal/storage/mongo_doc_store_test.go +++ b/internal/storage/mongo_doc_store_test.go @@ -13,7 +13,7 @@ import ( "go.mongodb.org/mongo-driver/v2/bson" "go.mongodb.org/mongo-driver/v2/mongo" - "github.com/tiennm99/miti99bot/internal/testutil/mongotest" + "github.com/tiennm99/tiennm99bot/internal/testutil/mongotest" ) var mongoTests mongotest.Manager @@ -35,7 +35,7 @@ func mongoLocalSetup(t *testing.T) (*mongo.Database, func()) { if err != nil { t.Fatalf("NewMongoClient: %v", err) } - dbName := fmt.Sprintf("miti99bot_test_%d", time.Now().UnixNano()) + dbName := fmt.Sprintf("tiennm99bot_test_%d", time.Now().UnixNano()) if len(dbName) > 63 { dbName = dbName[:63] } diff --git a/internal/systemstate/systemstate.go b/internal/systemstate/systemstate.go index f2c17fd..bdc77af 100644 --- a/internal/systemstate/systemstate.go +++ b/internal/systemstate/systemstate.go @@ -7,7 +7,7 @@ import ( "context" "errors" - "github.com/tiennm99/miti99bot/internal/storage" + "github.com/tiennm99/tiennm99bot/internal/storage" ) // CollectionName is the app-level collection for startup tasks and other diff --git a/renderer/README.md b/renderer/README.md index a016962..f7babea 100644 --- a/renderer/README.md +++ b/renderer/README.md @@ -1,6 +1,6 @@ # renderer -Part of miti99bot: the service behind `/wheelofnames`, `/gacha`, and +Part of tiennm99bot: the service behind `/wheelofnames`, `/gacha`, and `/genshin`, deployed by the root `compose.yml` as the `renderer` service. Self-hosted API that renders wheel-of-names GIF animations and Genshin-style meteor wish MP4 animations with Remotion, and card-pack gacha wish MP4 @@ -177,8 +177,8 @@ Use a container runtime first. Static-only platforms cannot satisfy dependencies, and FFmpeg/compositor support. ```sh -docker build -t miti99bot-renderer . -docker run --rm -p 3000:3000 miti99bot-renderer +docker build -t tiennm99bot-renderer . +docker run --rm -p 3000:3000 tiennm99bot-renderer ``` Recommended starting resources: 1-2 vCPU and 1-2 GB RAM, with diff --git a/renderer/docs/deployment.md b/renderer/docs/deployment.md index 00797c2..0977f46 100644 --- a/renderer/docs/deployment.md +++ b/renderer/docs/deployment.md @@ -1,6 +1,6 @@ # Deployment -## miti99bot compose +## tiennm99bot compose The root `compose.yml` builds this folder as the `renderer` service and points the bot at it over the compose network. The API has no authentication: it is diff --git a/renderer/docs/miti99bot-integration.md b/renderer/docs/tiennm99bot-integration.md similarity index 87% rename from renderer/docs/miti99bot-integration.md rename to renderer/docs/tiennm99bot-integration.md index d129797..ec4e27b 100644 --- a/renderer/docs/miti99bot-integration.md +++ b/renderer/docs/tiennm99bot-integration.md @@ -1,6 +1,6 @@ -# miti99bot Integration +# tiennm99bot Integration -miti99bot's `/wheelofnames` renders its wheel with this service, configured +tiennm99bot's `/wheelofnames` renders its wheel with this service, configured by `RENDERER_URL`, the service's base URL. The service is internal to the compose network, so requests carry no credentials. Winner handling stays explicit: @@ -42,7 +42,7 @@ winner selection is used. ## Gacha -`/gacha` in miti99bot calls `POST /api/gacha` on the same service. +`/gacha` in tiennm99bot calls `POST /api/gacha` on the same service. The bot appends the route to `RENDERER_URL`, picks the result and rarity itself, and sends the MP4 with `sendAnimation`. On any failure it falls back to a text reply. diff --git a/renderer/package-lock.json b/renderer/package-lock.json index 969553f..93be3ec 100644 --- a/renderer/package-lock.json +++ b/renderer/package-lock.json @@ -1,11 +1,11 @@ { - "name": "miti99bot-renderer", + "name": "tiennm99bot-renderer", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "miti99bot-renderer", + "name": "tiennm99bot-renderer", "version": "0.1.0", "dependencies": { "@remotion/bundler": "4.0.485", diff --git a/renderer/package.json b/renderer/package.json index b43c8ce..1baa559 100644 --- a/renderer/package.json +++ b/renderer/package.json @@ -1,5 +1,5 @@ { - "name": "miti99bot-renderer", + "name": "tiennm99bot-renderer", "version": "0.1.0", "private": true, "type": "module", diff --git a/renderer/src/gacha/page/page.js b/renderer/src/gacha/page/page.js index ad88850..137bd9f 100644 --- a/renderer/src/gacha/page/page.js +++ b/renderer/src/gacha/page/page.js @@ -278,7 +278,7 @@ const renderBack = () => { const print = el('div', 'recap-card-print'); const seal = el('span', 'recap-print-seal wish-moon-seal'); seal.append(el('span', '', moon)); - print.append(el('span', 'recap-print-channel'), seal, el('span', 'recap-print-edition', 'miti99bot')); + print.append(el('span', 'recap-print-channel'), seal, el('span', 'recap-print-edition', 'tiennm99bot')); return print; };