Setup dynamic nightbot command

I have 2 pastebin collection, 1 for proverbs and other for titles. I would like to fetch both the collection and formulate the sentence. However, the command crosses the character limit for nightbot command response.

I was wondering if the script can be placed in Pastebin. The response of the pastebin is then treated as an actual command response.

EX: Hello {proverb(handsome)} {title(king)}.
Given below is the script.
Hello, $(eval a=$(urlfetch json;a[Math.floor(Math.random()*a.length)]) of the $(eval a=$(urlfetch json;a[Math.floor(Math.random()*a.length)])

Is there anyway of doing this?

the script, as u called it, fits within the command response window almost 2.5 times, what do u mean it crosses the character limit?

my best guess is that it crosses the twitch character limit of 400 characters… which leads me to believe it’s taking the entire list of words, not just a single word… best way i can think to test this is to add a ;a.length after the close bracket ] so that it just gives the length of a… i’m not sure what your pastes look like but i’m guessing the data isn’t a json object… which means u likely need to .split() the data to make an array

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