!gang command NEED HELP

Asked Sep 6, 2020·1 reply·Last activity 5 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.

Hello, I want to make a command that states a message after the user gets a certain value. I have started on the command.

!addcom !gang $(user) Is $(customapi http://2g.be/twitch/randomnumber.php?=defstart=1&defend=100)% Gang!

but i want it say something like “you are not gang” if the user gets a value under 50% & “you are certified gang” if the user gets a value 50% and over

1 reply

This should work:

!addcom !gang $(eval a=Math.floor(Math.random()*100+1);if(a>50){b="$(user) is certified gang."}else{b="$(user) is not gang."};b)

I can make it so that the message will always be the same for the person but right now it’s random 50/50 chance of which message.
Hope this helped 🙂