NightDev Community Forums

Help with my !funfact command

Hi guys, total n00b here. I have created my !funfact command following some templates I found on these boards for joke bots, 8-ball bots, etc. It’s not working, I get the same [Response must be less than 400 characters] error that other people have had, but none of their remedies is working for me. Can anyone help me figure this out?

$(eval var facts = “$(urlfetch “.split(”;”); facts[Math.floor(Math.random() * (facts.length - 1))]:wink:

Hiya, your command was close, you can avoid the character limit by adding json to the urlfetch variable:

$(eval facts= "$(urlfetch json".split(";"); facts[Math.floor(Math.random() * (facts.length - 1))])

thank you so much, @xgerhard! It works!