🎲 monopoly framework
This commit is contained in:
21
Gwendolyn.py
21
Gwendolyn.py
@ -10,9 +10,9 @@ import random
|
||||
#import math
|
||||
import os
|
||||
|
||||
from funcs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles, emojiToNumber, fiarReactionTest, deleteGame, stopServer, checkBalance, giveMoney, triviaCountPoints, triviaStart, triviaAnswer, blackjackShuffle, blackjackStart, blackjackPlayerDrawHand, blackjackContinue, blackjackFinish, blackjackHit, blackjackStand, blackjackDouble, blackjackSplit, parseFourInARow, fourInARowAI, spellFunc, monsterFunc, nameGen, tavernGen, movieFunc, roll_dice, parseChar, parseRoll, critRoll, parseDestiny, parseHex, addToDict
|
||||
from funcs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles, emojiToCommand, fiarReactionTest, deleteGame, stopServer, checkBalance, giveMoney, triviaCountPoints, triviaStart, triviaAnswer, blackjackShuffle, blackjackStart, blackjackPlayerDrawHand, blackjackContinue, 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
|
||||
from gameLoops import fiar, blackjackLoop, runHex, runMonopoly
|
||||
|
||||
commandPrefix = "!"
|
||||
|
||||
@ -569,6 +569,14 @@ async def parseCommands(message,content):
|
||||
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))
|
||||
@ -615,11 +623,16 @@ async def on_reaction_add(reaction,user):
|
||||
message = reaction.message
|
||||
channel = message.channel
|
||||
logThis(user.display_name+" reacted to a message",str(channel))
|
||||
fourInARowTheirTurn, piece = fiarReactionTest(channel,message,"#"+str(user.id))
|
||||
try:
|
||||
fourInARowTheirTurn, piece = fiarReactionTest(channel,message,"#"+str(user.id))
|
||||
except:
|
||||
fourInARowTheirTurn = False
|
||||
|
||||
if fourInARowTheirTurn:
|
||||
place = emojiToNumber(reaction.emoji)
|
||||
place = emojiToCommand(reaction.emoji)
|
||||
await fiar(channel," place "+str(piece)+" "+str(place),user.id)
|
||||
elif monopolyReactionTest(channel,message):
|
||||
await runMonopoly(channel,"roll","#"+str(user.id))
|
||||
|
||||
# Runs the whole shabang
|
||||
client.run(token)
|
||||
|
Reference in New Issue
Block a user