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 https://pastebin.com/raw/zuuSHMH7 here is the full command $(eval deals = $(urlfetch json https://pastebin.com/raw/zuuSHMH7)) But the response was Unexpected token ‘:’
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! https://www.cardomax.com/discount/THINND/?ref=390 / PIA VPN: 4 extra months FREE with insane $2 / mo special https://www.piavpn.com/Thinnd / Xidax: $50 OFF for every $1k spent, & spin the wheel https://www.xidax.com/thinnd
Can be converted to an array of deals in javascript:
[
'CardoMax buy 2 get 2 FREE! https://www.cardomax.com/discount/THINND/?ref=390',
'PIA VPN: 4 extra months FREE with insane $2 / mo special https://www.piavpn.com/Thinnd',
'Xidax: $50 OFF for every $1k spent, & spin the wheel https://www.xidax.com/thinnd'
]
And converted to JSON with JSON.stringify([Array]) to the following string
["CardoMax buy 2 get 2 FREE! https://www.cardomax.com/discount/THINND/?ref=390","PIA VPN: 4 extra months FREE with insane $2 / mo special https://www.piavpn.com/Thinnd","Xidax: $50 OFF for every $1k spent, & spin the wheel https://www.xidax.com/thinnd"]
You can then use $(eval deals = $(urlfetch json https://pastebin.com/raw/something); deals[1]). Or get a random number between 0 and the length of the array to put as the array value.
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.