i am having issues trying to make randomized responses work. this literally the first time ive tried to do anything like this, so im mute to some of the language used. I have this in the messages section for nightbot:
$(eval a=$(urlfetch json https://pastebin.com/raw/h0sH4607);a[Math.floor(Math.random()*a.length)])
ive gone line by line and made sure i had ` before and after with the coma at the end. what am i doing wrong? i keep getting “Invalid or unexpected token” when i type the command.
I’ve tried testing it out and I can’t get the same result as you @Emily idk what the issue is. My best advice is to just get rid of the ` and , and put ; at the end of each line and just spilt it to turn it into an array as that has worked for me in the past. But you’ll probably need night to tell you why it’s not working.
I don’t know what’s the issue then, because it still works for me.
This is the command I copy/pasted in my chat twice now, exactly what was typed above: