How do I make parameters?

Asked Feb 3, 2022·1 reply·Last activity 4 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 make something like:
!gamble {amount}

import random
win = 0
lose = 0
wnum = random.randint(1, ({amount} * 2))
if wnum > {amount}:
win = True
else:
lose = True
if win:
{score} += {amount}
else:
{score} -= {amount}

1 reply

Hiya, what would you want to display? Gambling with input, you can use $(1) or $(query) to get the input. However not sure what the goal is, what is 'score'? There is no way to store points/score, each time the command is used the points would be reset.