# -*- coding: utf-8 -*- import discord import asyncio #import pickle import codecs import string import json import random #import math import os from discord.ext import commands from funcs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles, emojiToCommand, fiarReactionTest, deleteGame, stopServer, checkBalance, giveMoney, triviaCountPoints, triviaStart, triviaAnswer, blackjackShuffle, blackjackStart, blackjackPlayerDrawHand, blackjackFinish, blackjackHit, blackjackStand, blackjackDouble, blackjackSplit, parseFourInARow, fourInARowAI, spellFunc, monsterFunc, nameGen, tavernGen, movieFunc, roll_dice, parseChar, parseRoll, critRoll, parseDestiny, parseHex, addToDict, monopolyReactionTest from gameLoops import fiar, blackjackLoop, runHex, runMonopoly # Blackjack shuffle variables blackjackMinCards = 50 blackjackDecks = 4 async def parseCommands(message,content): # Runs a game of four in a row elif content.startswith("fourinarow"): try: command = content.replace("fourinarow","") await fiar(message.channel,command,"#"+str(message.author.id)) except: logThis("Something went wrong (error code 1400)") # Runs a game of Hex elif content.startswith("hex"): try: command = content.replace("hex","") await runHex(message.channel,command,"#"+str(message.author.id)) except: logThis("Something went wrong (error code 1500)") # Runs a game of monopoly elif content.startswith("monopoly"): try: command = content.replace("monopoly","",1) await runMonopoly(message.channel,command,"#"+str(message.author.id)) except: logThis("Something went wrong (error code 1600)") # Not a command else: logThis("That's not a command (error code 001)",str(message.channel.id)) await message.channel.send("That's not a command (error code 001)")