Hi! I’ve created a command for nightbot to pull a fact from a list based on this article (Command that searches a bank of quotes, like the djkhaled one) however I’ve had so many issues and it won’t work. After changing the comma at the end of each line of my fact document and replacing with a “/” it is giving the error right-hand side of ‘instanceof’ is not an object.
Here is the code I’m working with.
$(eval var jokes = “$(urlfetch json https://pastebin.com/raw/RjzuKP6F) “.split(”/”); jokes[Math.floor(Math.random)( * (jokes.length - 1))]; )
I would really appreciate any help with this.