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:
tiennm99 committed 2026-10-03 11:52:50 +07:00
1 parent 2ec4a2b371
commit 277c913f71
15 files changed
+302 -301

No files matched your search

+1 -1
View File
@@ -100,7 +100,7 @@ func newGachaCommand(name string, visibility modules.Visibility, description, us
placeholder := sendRenderPlaceholder(ctx, b, update.Message, gachaPlaceholder)
animation, err := renderGachaAnimation(ctx, style, options[winner].Label, options[winner].Rarity)
if err != nil {
if !errors.Is(err, errWheelAPINotConfigured) {
if !errors.Is(err, errRendererNotConfigured) {
log.Warn("gacha remote render failed", "command", name, "err", err)
}
return replaceWheelPlaceholder(ctx, b, update.Message, placeholder, results[winner])