NightDev Community Forums

Invalid token with pastebin

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;a​[Math.floor(Math.random()*a.length)])

the pastebin url is:

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.

Hey @fr1day21!

I don’t see the issue, I added the command like you wrote it and it works just fine:

I tried it - even keeping the same paste bin and got " Unexpected identifier"

I’ve tried testing it out and I can’t get the same result as you @EmilyPerrimon 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.