Flip a coin command

Asked Jul 1, 2020·3 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.

i need help with a heads or Tails command so if it lands on heads or tails i want it to show a message for example heads, $(user) u lost

$(eval Math.floor(Math.random() * 2) == 0 ? “Heads” : “Tails”)

3 replies

Hey @Tidy Snail!

So Nightbot should be made aware of the winning result before sending the winning or lost message, right? Or will it be a constant, like Heads always a lost and Tails always a win? Or is the win/lost message random too?

basically i want it to be like my iq command but instead of a emote i will like it to be a message

Then I understand that you want a fixed win/lost response for tails/heads.

$(eval Math.floor(Math.random()*2)==0?`Heads, $(user) lost...`:`Tails, $(user) won!`)