🐛 Hex delete image
This commit is contained in:
@@ -11,6 +11,8 @@ class Funcs():
|
||||
|
||||
if user != None:
|
||||
return user["user name"]
|
||||
elif userID == "Gwendolyn":
|
||||
return userID
|
||||
else:
|
||||
logThis("Couldn't find user "+userID)
|
||||
return userID
|
||||
|
||||
@@ -185,8 +185,7 @@ class GameLoops():
|
||||
except:
|
||||
logThis("Error deleting old image (error code 1501)")
|
||||
oldImage = await channel.send(file = discord.File("resources/games/hexBoards/board"+str(channel.id)+".png"))
|
||||
if not gameDone:
|
||||
if gwendoTurn:
|
||||
if gwendoTurn and not gameDone:
|
||||
try:
|
||||
response, showImage, deleteImage, gameDone, gwendoTurn = self.bot.hex.hexAI(str(channel.id))
|
||||
except:
|
||||
@@ -198,8 +197,7 @@ class GameLoops():
|
||||
if deleteImage:
|
||||
await oldImage.delete()
|
||||
oldImage = await channel.send(file = discord.File("resources/games/hexBoards/board"+str(channel.id)+".png"))
|
||||
|
||||
else:
|
||||
if not gameDone:
|
||||
with open("resources/games/oldImages/hex"+str(channel.id), "w") as f:
|
||||
f.write(str(oldImage.id))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user