NightDev Community Forums

Roulette with Videos/clips

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:link: clip2:link: 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:

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

Can you post your current command?

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