1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-11 09:32:50 +00:00

play random audio from end point

This commit is contained in:
2019-07-22 19:59:24 -05:00
parent 4ea1586277
commit 6ed712c23d
3 changed files with 13 additions and 89 deletions

View File

@@ -46,7 +46,11 @@ func postSoundPlayHandler(c *gin.Context) {
// will need selector on UI if used for multiple servers
if len(connections) == 1 && params.Name != "" {
for _, con := range connections {
con.PlayAudio(params.Name, nil)
if params.Name == "random" {
con.PlayRandomAudio(nil)
} else {
con.PlayAudio(params.Name, nil)
}
}
}