Percentage command

How i can do a command that the 99% of times says no to an answer and the 1% says yes?

You can use Nightbot’s eval variable to run JavaScript code and then use JavaScript’s Math.random function.
So the command would be

$(eval Math.floor(Math.random()*100)==99?'Yes':'No')

You can add this command as !question through chat with

!addcom !question $(eval Math.floor(Math.random()*100)==99?'Yes':'No')
1 Like

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