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

View File

@@ -414,8 +414,6 @@ async def parseCommands(message,content):
elif content.startswith("blackjack"): elif content.startswith("blackjack"):
# Starts the game # Starts the game
if content == "blackjack" or content == "blackjack ": if content == "blackjack" or content == "blackjack ":
new_message = blackjackStart(str(message.channel))
if new_message == "started":
cardsLeft = 0 cardsLeft = 0
with open("resources/games/blackjackCards.txt","r") as f: with open("resources/games/blackjackCards.txt","r") as f:
for line in f: for line in f:
@@ -427,6 +425,9 @@ async def parseCommands(message,content):
logThis("Shuffling the blackjack deck...",str(message.channel)) logThis("Shuffling the blackjack deck...",str(message.channel))
await message.channel.send("Shuffling the deck...") await message.channel.send("Shuffling the deck...")
new_message = blackjackStart(str(message.channel))
if new_message == "started":
new_message = "Blackjack game started. Use \""+commandPrefix+"blackjack bet [amount]\" to enter the game within the next 30 seconds." 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) await message.channel.send(new_message)
oldImage = await message.channel.send(file = discord.File("resources/games/blackjackTables/blackjackTable"+str(message.channel)+".png")) oldImage = await message.channel.send(file = discord.File("resources/games/blackjackTables/blackjackTable"+str(message.channel)+".png"))