Could someone whip me up a random chance command

Asked Aug 1, 2020·2 replies·Last activity 6 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.

Not familiar with javascript at all.

I need a command that randomly outputs one of two responses with a 96:4 chance.

Thanks.

2 replies

Type this in you chat

!addcom !(COMMAND_NAME) $(eval var random=(Math.floor(Math.random()*100)+1);random<=96?"RESPONSE_ONE":"RESPONSE_TWO")

The first response is the more common one.

Thanks! Missed the terminating bracket, though xd really appreciate it