🎲 monopoly framework
This commit is contained in:
@ -186,7 +186,7 @@ def replaceMultiple(mainString, toBeReplaces, newString):
|
||||
|
||||
return mainString
|
||||
|
||||
def emojiToNumber(emoji):
|
||||
def emojiToCommand(emoji):
|
||||
if emoji == "1️⃣":
|
||||
return 1
|
||||
elif emoji == "2️⃣":
|
||||
@ -201,6 +201,8 @@ def emojiToNumber(emoji):
|
||||
return 6
|
||||
elif emoji == "7️⃣":
|
||||
return 7
|
||||
elif emoji == "🎲":
|
||||
return "roll"
|
||||
else: return ""
|
||||
|
||||
def fiarReactionTest(channel,message,user):
|
||||
@ -223,16 +225,31 @@ def fiarReactionTest(channel,message,user):
|
||||
else:
|
||||
return False, 0
|
||||
|
||||
def monopolyReactionTest(channel,message):
|
||||
with open("resources/games/oldImages/monopoly"+str(channel), "r") as f:
|
||||
oldImage = int(f.read())
|
||||
|
||||
if message.id == oldImage:
|
||||
logThis("They reacted to the monopoly game")
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def stopServer():
|
||||
with open("resources/games/games.json","r") as f:
|
||||
data = json.load(f)
|
||||
games = json.load(f)
|
||||
|
||||
data["trivia questions"] = {}
|
||||
data["blackjack games"] = {}
|
||||
data["4 in a row games"] = {}
|
||||
games["trivia questions"] = {}
|
||||
games["blackjack games"] = {}
|
||||
games["4 in a row games"] = {}
|
||||
|
||||
with open("resources/games/games.json","w") as f:
|
||||
json.dump(data,f,indent=4)
|
||||
json.dump(games,f,indent=4)
|
||||
|
||||
emptyDict = {}
|
||||
|
||||
with open("resources/games/monopolyGames.json", "w") as f:
|
||||
json.dump(emptyDict,f,indent=4)
|
||||
|
||||
def deleteGame(gameType,channel):
|
||||
with open("resources/games/games.json", "r") as f:
|
||||
|
Reference in New Issue
Block a user