🐛 Don't delete the image after an ended game
This commit is contained in:
@ -59,14 +59,6 @@ async def runHex(channel,command,user):
|
||||
if gameDone:
|
||||
with open("resources/games/hexGames.json", "r") as f:
|
||||
data = json.load(f)
|
||||
|
||||
try:
|
||||
with open("resources/games/oldImages/hex"+str(channel.id), "r") as f:
|
||||
oldImage = await channel.fetch_message(int(f.read()))
|
||||
await oldImage.delete()
|
||||
except:
|
||||
logThis("The old image was already deleted")
|
||||
|
||||
winner = data[str(channel.id)]["winner"]
|
||||
if winner != 0:
|
||||
addMoney(data[str(channel.id)]["players"][winner-1].lower(),20)
|
||||
|
Reference in New Issue
Block a user