Nightbot character limit

Help please, i am dumb when it comes to coding, so i recently found out that i can create a nightbot command ruling out character limit by using my here is the full command $(eval deals = $(urlfetch json But the response was Unexpected token ‘:’

Someone please enlighten me what i did wrong?

Using json in $(urlfetch json) actually parses a JSON string and converts it into a JavaScript Object. In the current example:

Deals: CardoMax buy 2 get 2 FREE! / PIA VPN: 4 extra months FREE with insane $2 / mo special / Xidax: $50 OFF for every $1k spent, & spin the wheel

Can be converted to an array of deals in javascript:

    'CardoMax buy 2 get 2 FREE!',
    'PIA VPN: 4 extra months FREE with insane $2 / mo special',
    'Xidax: $50 OFF for every $1k spent, & spin the wheel'

And converted to JSON with JSON.stringify([Array]) to the following string

["CardoMax buy 2 get 2 FREE!","PIA VPN: 4 extra months FREE with insane $2 / mo special","Xidax: $50 OFF for every $1k spent, & spin the wheel"]

You can then use $(eval deals = $(urlfetch json; deals[1]). Or get a random number between 0 and the length of the array to put as the array value.

Hope this gets you started.

I am lost more than i was : ((((

Upon reading the post the initial reply I gave won’t work in your situation. The max character limit is enforced by the service you use. I tried doing something simliar to this post, but you would probably want all the links in one message, which isn’t possible unless you break up each link to separate commands for each link or shorten the entire command.

Understood and yes i want all the links in 1 command prompt only, which i thought using pastebin would bypass character limit

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