feat(gacha): add /api/gacha wish animation rendered as MP4

A meteor coloured by rarity falls across a night sky, lands in a white
flash, and the label is revealed with its stars popping in. The caller
picks the result and rarity; the route only draws it. Renders as silent
H.264 so Telegram plays it as an animation without GIF banding, and
shares the render slots with /api/gif.
This commit is contained in:
tiennm99 committed 2026-10-01 11:43:42 +07:00
1 parent 61d0e74709
commit 97d8aeaadf
16 files changed
+1111 -20

No files matched your search

+8
View File
@@ -37,3 +37,11 @@ Send `Authorization: Bearer <API_TOKEN>` with the JSON body.
`X-Wheel-Winner` is URL-encoded. Decode it before displaying if service-side
winner selection is used.
## Gacha
`/gacha` in miti99bot calls `POST /api/gacha` on the same service and token.
The bot derives the endpoint from `WHEELOFNAMES_API_URL` by replacing its last
path segment (`/api/gif` becomes `/api/gacha`), picks the result and rarity
itself, and sends the MP4 with `sendAnimation`. On any failure it falls back to
a text reply.