A way to generate a random command

Asked Jun 22, 2021·2 replies·Last activity 5 years 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.

Let me rephrase this to be sure its understood I'm not looking on how to create a random generation but asking if there is a way to Generate a random command from my list? I hope that makes sense.. I just started using nightbot a day ago lol but do dabble in code.

this is works but doesn't execute the command

$(eval a=[!anyonethere,!babies,!god,!goddess,!owl,!voices,!slap @1mentalmisfi,!hug @1mentalmisfit,!pandora,!nerd];a[Math.floor(Math.random()*a.length)])

2 replies

No not really the only way to do that would be to combine all your commands into one big command that picks out a random one really.

Mmmmm yes that sounds very clunky.. Okay well I appreciate the response.