How to make Nightbot say a random name

How do I make it say a random name, or just anything random from a selection of certain things (like if I want it to randomize between saying “cool” “awesome” or “ugly”).

!commands add !randomword $(eval words = ["cool", "awesome", "ugly"]; words[Math.floor(Math.random() * words.length)])

If you want a random viewer:

!commands add !randomviewer $(urlfetch$(channel))

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