Randomize a list of preset songs on AutoDJ

Heya guys,
so I’m trying to create a command called “!inspire”:
I’m trying to bring a random songrequest (from a list of options which I would set from Youtube) to AutoDJ play a song from this list. I tryied to make it call !sr as an alias, but it would not work.

Also, I tryied a custom API, in which I created some variables, so the response would roll one of the answers, but it keeps returning an error. At the end, it would send the request, but the bot doens’t see it as an sonrequest. I used the very end of youtube’s link, and set them as “song1”, “song2”, “song3”…

!sr $(eval a=[“song1”, “song2”, “song3”];a[Math.floor(Math.random() * a.length)])

Where you read song1, 2 or 3, I replaced with YT link.

I tryied my best to clarify. Sorry for the bad english thou.

1 Like

One potential problem I see with that is you might be using curly double quotes instead of straight quotes. Delete the original !inspire command, then try this:

!addcom -cd=5 !inspire -a=!sr $(eval a=["song1","song2","song3"];a[Math.floor(Math.random()*a.length)])

Then replace song1/song2/song3 with the YouTube song links.

1 Like

Just made an ajust (for each bot I tryied), and it works wonders… but, only if I use two different bots, because they seem to not treat theyr own message as a request. HAHAHAHA.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.