Roulette with Videos/clips

Asked Feb 11, 2020·5 replies·Last activity 6 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

how do i make a command where if a user in my chat write !clip they get a random clip from all the clips i added into that command? lets say for example: clip1🔗 clip2🔗 and so on, he write !clip he will get randomly 1 clip with a link too that clip, lets say he got the clip 1 so he get clip 1: link.xx : and there is no X amount of clips/links i can have inside that random generator :)

slight_smile.png

5 replies

Paste the clip links into the array of the following code. Keep them bound by backticks and separated by commas as shown below.

!addcom -cd=5 !clip $(eval a=[`link 1`,`link 2`,`etc`];a[Math.floor(Math.random()*a.length)])

it tells me my link is not a function.. is it because my like is XX.c.o.m/iasjdiasd like that? the problem is at the / sign ? because it doesnt show my words after the /

now i get this instead: Right-hand side of 'instanceof' is not an object .. i manage to make 2 links work but somehow i manage to do something wrong with multi links

i solved it. it was something false with the markers ( i , i ) i made.. so i just copy pasted his

Didn't find your answer? The community is on Discord.

Ask on Discord