mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-10-05 02:13:50 +00:00
867 B
867 B
miti99bot Integration
Future bot integration should keep winner handling explicit.
Recommended Flow
- Bot parses
/wheelofnamesbetaoptions. - Bot chooses
winnerIndexlocally. - Bot calls
POST /api/gif. - Bot sends response bytes with Telegram
sendAnimation. - Bot caption uses local winner as source of truth.
- If the service fails, bot falls back to existing local GIF renderer.
Request
Send Authorization: Bearer <API_TOKEN> with the JSON body.
{
"options": ["alice", "bob", "carol"],
"winnerIndex": 1,
"durationMs": 6500,
"holdMs": 1200,
"fps": 15,
"size": 512,
"theme": "classic"
}
Response
- Body:
image/gif - Headers:
X-Wheel-Winner-IndexX-Wheel-WinnerX-Render-Duration-Ms
X-Wheel-Winner is URL-encoded. Decode it before displaying if service-side
winner selection is used.