✨ Uses channel ID istead of name
This commit is contained in:
@ -209,13 +209,13 @@ def fiarReactionTest(channel,message,user):
|
||||
with open("resources/games/games.json", "r") as f:
|
||||
data = json.load(f)
|
||||
|
||||
with open("resources/games/oldImages/fourInARow"+str(channel), "r") as f:
|
||||
with open("resources/games/oldImages/fourInARow"+str(channel.id), "r") as f:
|
||||
oldImage = int(f.read())
|
||||
|
||||
if message.id == oldImage:
|
||||
logThis("They reacted to the fourinarow game")
|
||||
turn = data["4 in a row games"][str(channel)]["turn"]
|
||||
if user == data["4 in a row games"][str(channel)]["players"][turn]:
|
||||
turn = data["4 in a row games"][str(channel.id)]["turn"]
|
||||
if user == data["4 in a row games"][str(channel.id)]["players"][turn]:
|
||||
return True, turn+1
|
||||
else:
|
||||
logThis("It wasn't their turn")
|
||||
@ -224,7 +224,7 @@ def fiarReactionTest(channel,message,user):
|
||||
return False, 0
|
||||
|
||||
def monopolyReactionTest(channel,message):
|
||||
with open("resources/games/oldImages/monopoly"+str(channel), "r") as f:
|
||||
with open("resources/games/oldImages/monopoly"+str(channel.id), "r") as f:
|
||||
oldImage = int(f.read())
|
||||
|
||||
if message.id == oldImage:
|
||||
|
Reference in New Issue
Block a user