So I’m trying to make a command on nightbot using pastebin to pull a random fact from pastebin. I already have a slap command that does the same thing and it DOES work. But when creating a new one for the random fact command, it just says “Unexpected Identifier” in chat when I test the command in my Twitch chat…what am I doing wrong?
The command variable I use is:
$(eval a=“$(urlfetch json )”.split(“;”);a[Math.floor(Math.random()*a.length)])
The pastebin link IS there after the “json” but this wont let me post with a link so I just took that part out for the purpose of this post.