🐛 Players can't bet negative amounts

This commit is contained in:
NikolajDanger
2020-07-28 02:20:10 +02:00
parent 81012bada5
commit 620dd43898

View File

@ -195,6 +195,7 @@ def blackjackPlayerDrawHand(channel,user,bet):
if user not in data["blackjack games"][channel]["user hands"]:
if len(data["blackjack games"][channel]["user hands"]) < 5:
if data["blackjack games"][channel]["open for bets"]:
if bet >= 0:
if money.checkBalance(user) >= bet:
money.addMoney(user,-1 * bet)
playerHand = [drawCard(),drawCard()]
@ -217,6 +218,9 @@ def blackjackPlayerDrawHand(channel,user,bet):
else:
logThis(user+" doesn't have enough GwendoBucks")
return "You don't have enough GwendoBucks to place that bet"
else:
logThis(user+" tried to bet a negative amount")
return "You can't bet a negative amount"
else:
logThis("The table is no longer open for bets")
return "The table is no longer open for bets"