How do I get Nightbot to choose from multiple phrases?

Asked Sep 17, 2024·2 replies·Last activity 1 year ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

I found this post -> /t/is-it-possible-for-nightbot-to-randomly-pick-one-out-of-many-choices/15346… on here and while it helps with creating the command I need for Nightbot to choose at random from multiple choices, it does not allow me to use phrases such as "folding the dishes", since there are spaces between the words.
So basically, I was wondering if there was a way to have Nightbot select one of multiple phrases instead of just being single word choices in the command?
I haven't been able to find anything online for any sort of answer to this question no matter where I look, so any help would be much appreciated.

2 replies

Hiya! You can replace those words with sentences, just keep the sentences inside quotes:

!addcom !pick $(eval const responses = ['folding the dishes', 'hello there', 'multiple words sentence', 'test']; responses[Math.floor(Math.random() * responses.length)];)

If you have a bunch of sentences and hit the character limit, you can use for example pastebin.com to store the list and pick a random value from there.

i thought i had the quotations in the command but i guess not, and it made it all get messed up. i appreciate the help, thanks a bunch!