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


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



!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.

1 Like

Thank you, that worked !

1 Like

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