Code for variable response

Asked May 25, 2020·1 reply·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.

I want to create a team by type,
"user is a 1-100% bird." And if the number is less than 50 then it is not a bird, but if it is more then a bird. help plz

1 reply

Hey @Vivid Sloth!

So you want a 50/50 chance of someone to be a bird, the simplest way to go about it is the following:

$(eval b=[`a bird!`,`NOT a bird.`];`$(user) is ${b[Math.floor(Math.random()*2)]}`)