Hi, I’m trying to make a command to pull 3 random items from a list and I’ve seen this code from a developer somewhere else but it doesn’t work and i keep getting unexpected errors for identifiers and tokens etc. and I was wondering if anyone could help?
The code I tried is
$(eval a=$(urlfetch json https://pastebin.com/raw/xxxx).split(,); a.pop(); b=[]; for(i=0;i<3;i++){b.push(a.splice(Math.floor(Math.random()*a.length),1));})
I’ve also tried this without the a.pop() and that won’t work either
My pastebin has the following layout:
[ abc,
def,
ghi.]