This commit is contained in:
NikolajDanger
2020-07-30 12:52:01 +02:00
parent 2ede363c9e
commit df1c5f4196

View File

@ -414,18 +414,19 @@ async def parseCommands(message,content):
elif content.startswith("blackjack"):
# Starts the game
if content == "blackjack" or content == "blackjack ":
cardsLeft = 0
with open("resources/games/blackjackCards.txt","r") as f:
for line in f:
cardsLeft += 1
# Shuffles if not enough cards
if cardsLeft < blackjackMinCards:
blackjackShuffle(blackjackDecks)
logThis("Shuffling the blackjack deck...",str(message.channel))
await message.channel.send("Shuffling the deck...")
new_message = blackjackStart(str(message.channel))
if new_message == "started":
cardsLeft = 0
with open("resources/games/blackjackCards.txt","r") as f:
for line in f:
cardsLeft += 1
# Shuffles if not enough cards
if cardsLeft < blackjackMinCards:
blackjackShuffle(blackjackDecks)
logThis("Shuffling the blackjack deck...",str(message.channel))
await message.channel.send("Shuffling the deck...")
new_message = "Blackjack game started. Use \""+commandPrefix+"blackjack bet [amount]\" to enter the game within the next 30 seconds."
await message.channel.send(new_message)