I have created a command for users to “gamble”.
!gamble $(user) gambles $(querystring) bolts and $(eval a=[“wins!”, “loses”];a[Math.floor(Math.random() * a.length)]) a user is able to “gamble” a number of bolts and they win or lose.
I have also created one with a random number
!gamble $(user) gambles $(customapi http://2g.be/twitch/randomnumber.php?=defstart=1&defend=100000&start=$(1)&end=$(2)) bolts and $(eval a=[“wins!”, “loses”];a[Math.floor(Math.random() * a.length)])
Can I make it so that a random number is selected only if there is no user selected number, but still allow people to select a number? I have been experimenting, but I am clueless with coding and how to integrate different things. Any help is very appreciated