Nightbot funfact command?


I wanna add a !funfact command, so everytime somebody type that into the chat,a random funfact out of a pastebin list for example is picked and writed in the chat :slight_smile: how is that possible?

Hi @zfrettich yes, it is possible.

!addcom -cd=5 !funfact Fact: $(eval a = $(urlfetch json; a[Math.floor(Math.random() * a.length)])	

Also, I believe this fact topic is being discussed a lot of times. Next time consider checking the Forum first, you probably find the answer.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.