Trigger Nightbot when a word is said a random amount of times

Asked Feb 25, 2022·2 replies·Last activity 4 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.

Hi,

Does anyone know if there is a way to trigger a response from Nightbot after a word is mentioned in chat a random about of times? The best example I have is duck duck goose. So chat members say duck and then Nightbot responds goose after a random amount of triggers

Thanks

2 replies

Here

!addcom !quack $(eval Math.floor(Math.random()*X)+1==1?`Goose`:` `)

The rate at which it triggers will be 1/X so if you put 2 it will trigger 50% of the time.