mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-17 08:14:58 +00:00
refactor(random)!: configure the renderer by base URL as RENDERER_URL
The bot now takes the renderer's base URL and appends each /api/<name> route itself, instead of taking the full /api/gif endpoint and swapping its last path segment for /gacha and /genshin. The client, its files, and its errors are named after the renderer rather than wheelofnames; the /wheelofnames command keeps its name. BREAKING CHANGE: WHEELOFNAMES_API_URL is replaced by RENDERER_URL, which holds the base URL (e.g. http://renderer:3000) rather than the /api/gif endpoint. compose.yml sets it, so Coolify needs no value.
This commit is contained in:
1 parent
2ec4a2b371
commit
277c913f71
15 files changed
+302
-301
No files matched your search
@@ -1,7 +1,7 @@
|
||||
# miti99bot Integration
|
||||
|
||||
miti99bot's `/wheelofnames` renders its wheel with this service, configured
|
||||
by `WHEELOFNAMES_API_URL` (pointing at `/api/gif`). The service is internal to
|
||||
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:
|
||||
|
||||
@@ -43,8 +43,7 @@ winner selection is used.
|
||||
## Gacha
|
||||
|
||||
`/gacha` in miti99bot calls `POST /api/gacha` on the same service.
|
||||
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
|
||||
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.
|
||||
|
||||
|
||||
Reference in new issue
Block a user