Making a command with a random chance to "ban"

Disclaimer: I know Nightbot can’t timeout or ban! Also I am very bad at anything coding related so apologies if this is super basic.

My viewers are oddly interested in being timed out and often post “!banme” in chat, despite it not being a command yet. I would like to have a command that has a 1/100 chance to decide to “ban” with the remaining 99/100 outcomes being a “timeout”.

Would the easiest way to do this be making a pastebin with “timeout” written 99 times and “banned” once, or is there a simpler way?

The simplest way is this:

$(eval Math.floor(Math.random()*100)==0?`Ban`:`Timeout`)
2 Likes

It works great, thank you!

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