From 7d833b41b6576f845e6b78abbc3feda5ed4fa591 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Wed, 29 Jul 2020 14:27:59 +0200 Subject: [PATCH] :sparkles: cards command --- Gwendolyn.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Gwendolyn.py b/Gwendolyn.py index d9f614d..b09ba4d 100644 --- a/Gwendolyn.py +++ b/Gwendolyn.py @@ -7,6 +7,7 @@ import codecs import string import json import random +import math from funcs import * @@ -487,6 +488,14 @@ async def parseCommands(message,content): logThis("Shuffling the blackjack deck...") await message.channel.send("Shuffling the deck...") + elif content.startswith("blackjack cards"): + with open("resources/games/blackjackCards.txt","r") as f: + for line in f: + cardsLeft += 1 + + decksLeft = math.floor(cardsLeft/52) + await message.channel.send(str(cardsLeft)+" cards, "+str(decksLeft)+" decks") + else: await message.channel.send("I didn't quite understand that")