mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-20 02:18:23 +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
@@ -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])
|
||||
|
||||
Reference in new issue
Block a user