Hii guys, Thank you for taking your time reading this and replying!
i saw other post similiar to mine and i tried out what they did but it didnt work for me!
When i use my commands sometimes it works perfectly and sometimes it respond with: [Error Connecting To WebEval Service]
This is what i have in my commands return:
$(eval q=decodeURIComponent("$(querystring)"); var jokes = $(urlfetch json https://pastebin.com/raw/dRZSZbxL).split(","); jokes[Math.floor(Math.random() * jokes.length)])
I do not know much about Nightbot and how it all works so please forgive me if i made a noob mistake or anything
If someone knows how to fix my problem, ill be thankfull for ever!
Sorry for bad english, i tried to fix some grammer mistakes!
The last line in the pastebin link contains a comma, therefore running a split() with a comma separator will result in an array of jokes where the last item is just an empty string. If Nightbot chooses to output this empty string, it will instead output “[Error Connecting to WebEval Service]”. The following code should accommodate for the extra comma:
Thank you alot! i think i do understand a little what you said.
correct me if im wrong but seems like i had to remove the last comma?
But again, thank you alot for helping out. appreciate it !