Trouble with pastebin

I am trying to make a random pun generator for my chat, when I try to use it it says “unexpected identifier” each time

The command I am trying to use to input it is: !addcom -cd=5 !nopunintended $(eval a=$(urlfetch json https://pastebin.com/raw/qsM2QQdp);a[parseInt(decodeURIComponent($(querystring)))-1]||a[Math.floor(Math.random()*a.length)])

1 Like

Hi @bevta! :hugs:

I’m not very good at commands but I see that you didn’t add a split in your command like this:

$(eval responses = $(urlfetch json https://pastebin.com/raw/qsM2QQdp).split(",");
responses[Math.floor(Math.random()*responses.length)])

This is what my pastebin commands all look like and what others are aswell. I also add " (“space) and " (space”) on the bottom of my pastebins. Like this:

"
Hello,
Welcome,
To,
Nightdev,
"

I don’t know if this helps. :smile:

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