mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-11 03:13:46 +00:00
1.6 KiB
1.6 KiB
/gacha wish command
Status: done
Outcome
/gacha <option[*rarity],...> picks one option and replies with a Genshin
Impact style wish animation (meteor coloured by rarity, white flash, reveal
with stars), rendered as a silent MP4 by the existing wheelofnames service.
Decisions (user-approved 2026-10-01)
- Renderer lives in
tiennm99/wheelofnamesasPOST /api/gacha; no new repo or deployment. - Rarity is a user prefix:
Pizza, 4* Pho, 3* Rice(unprefixed = 5★; switched from the originalPizza*5suffix with a 3★ default on 2026-10-01). - Single pull only.
- Output MP4 (H.264, no audio) sent via
sendAnimation.
Design
- Every option is equally likely, as with /random; the rarity tag is cosmetic. (First shipped with Genshin tier rates; the user switched to uniform odds on 2026-10-01.)
- All visuals are procedural (CSS/gradients); no HoYoverse assets.
- Bot derives the gacha endpoint from
WHEELOFNAMES_API_URL(sibling pathgachanext togif), so no new env var. Same bearer token. - Bot is the source of truth for winner and rarity; renderer only draws.
- Fallback without renderer or on failure: text reply
★★★★★ Pizza.
Phases
- Renderer: schema,
GachaComposition, MP4 render, route, tests, docs. - Bot: parser, weighted pick, API client, command, tests, README/docs.
- Verify: renderer stills via Docker, lint/typecheck/test, go test/vet/lint.
Acceptance
- Each rarity renders with the correct meteor/glow colour and star count.
/gachawith no options shows usage; every option is equally likely, like /random.- Renderer failure falls back to text; thread IDs forwarded.