Nightbot/Pastebin command

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.

Hey @dominic_jennings!

Ah, that’s a shame because I think the problem is in the Pastebin, can’t you give us its ID? We don’t need the full link.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.