If/else with Math random

Hi
I want to make a command with a random number falling in the range from 0 to 100, and if it falls 100, then the bot writes one phrase, and if less, then another. help me please

Hey @zzoyl!

$(eval Math.floor(Math.random() * 101) === 100 ? 'NUMBER_EQUALS_100_SENTENCE' : 'DEFAULT_SENTENCE';)

If you need to use apostrophes in your sentence, you’ll need to escape them, like this: \' (add a backslash before them).

Please use the search bar before opening a new topic, we covered this topic so many times before.

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