Files
tiennm99 277c913f71 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.
2026-10-03 11:52:50 +07:00

21 lines
697 B
Go

// Package random groups the commands that pick one option at random: /random
// (plain text pick), /wheelofnames (wheel GIF when a renderer is configured),
// /gacha (card-pack wish MP4), and the unlisted /genshin (Genshin-style meteor
// wish MP4). The animated commands share the optional renderer service and
// fall back to a text reply without it.
package random
import "github.com/tiennm99/miti99bot/internal/modules"
// New is the module Factory. The commands keep no state, so deps is unused.
func New(_ modules.Deps) modules.Module {
return modules.Module{
Commands: []modules.Command{
randomCommand(),
wheelOfNamesCommand(),
gachaCommand(),
genshinCommand(),
},
}
}