Hi, so I was trying to make a Custom API Command for Borderlands 2’s Community Patch Notes (named !patchnotes), intended to work similar to the Quotes Custom API (so like !patchnotes 1 shows the first one listed in the Pastebin TXT, !patchnotes 2 shows the second one, and so on; all of them were intended to be separated by semi colons “;”), using a similar method from this Topic. Problem is, everytime I typed in !patchnotes, Nightbot will say “[Response must be less than 400 characters]”. Since I’m new to this and had no idea what to do, how do I fix the issue of Nightbot trying to show all of it instead of one-by-one like Quotes API?
Reference:
The message on !patchnotes currently is $(eval notes = "$(urlfetch https://pastebin.com/raw/t0p5xcBx) ".split(";"); notes[Math.floor(Math.random() * (notes.length - 1))])
So by using $(urlfetch json http://paste....) , do I need to add the variable name “notes” inside urlfetch itself while removing $(eval…) or do I add another variable name, different from “notes”, inside the $(urlfetch…)?
Oh, oh… I get it now, so to circumvent the character limit, the message for !patchnotes is going to be $(eval notes = "$(urlfetch json https://pastebin.com/raw/t0p5xcBx) ".split(";"); notes[Math.floor(Math.random() * (notes.length - 1))])?
EDIT: Tried that out, and yes that worked perfectly as I intended. Thanks for the help