🧹 Last bit of cleaning up before pushing

This commit is contained in:
NikolajDanger
2021-03-31 01:02:32 +02:00
parent b345720468
commit 6c1a1cf626
37 changed files with 125 additions and 118 deletions

View File

@ -14,7 +14,7 @@ class GameLoops():
for message in messages:
oldMessage = await channel.fetch_message(int(message))
self.bot.log("Deleting old message", level = 10)
self.bot.log("Deleting old message")
await oldMessage.delete()
except:
oldMessage = ""
@ -35,7 +35,7 @@ class GameLoops():
await ctx.send(response)
else:
await ctx.channel.send(response)
self.bot.log(response, channelId, level = 10)
self.bot.log(response, channelId)
if showImage:
if deleteImage:
oldImage = await self.deleteMessage("connectFour"+channelId,ctx.channel)
@ -44,7 +44,7 @@ class GameLoops():
if gwendoTurn:
response, showImage, deleteImage, gameDone, gwendoTurn = await self.bot.games.connectFour.connectFourAI(channelId)
await ctx.channel.send(response)
self.bot.log(response,channelId, level = 10)
self.bot.log(response,channelId)
if showImage:
if deleteImage:
await oldImage.delete()
@ -58,7 +58,7 @@ class GameLoops():
await oldImage.add_reaction(reaction)
except:
self.bot.log("Image deleted before I could react to all of them", level = 10)
self.bot.log("Image deleted before I could react to all of them")
else:
with open("resources/games/oldImages/connectFour"+channelId, "w") as f:
@ -68,7 +68,7 @@ class GameLoops():
for reaction in reactions:
await oldImage.add_reaction(reaction)
except:
self.bot.log("Image deleted before I could react to all of them", level = 10)
self.bot.log("Image deleted before I could react to all of them")
if gameDone:
game = self.bot.database["connect 4 games"].find_one({"_id":channelId})
@ -100,7 +100,7 @@ class GameLoops():
await channel.send(response)
else:
await ctx.send(response)
self.bot.log(response,str(channel.id), level = 10)
self.bot.log(response,str(channel.id))
if showImage:
if deleteImage:
await self.deleteMessage("hangman"+str(channel.id),channel)
@ -125,7 +125,7 @@ class GameLoops():
emoji = chr(ord(letter)+127397)
await message.add_reaction(emoji)
except:
self.bot.log("Image deleted before adding all reactions", level = 10)
self.bot.log("Image deleted before adding all reactions")
# Runs Hex
async def runHex(self,ctx,command,user):
@ -137,7 +137,7 @@ class GameLoops():
await ctx.send(response)
self.bot.log(response,str(channelId), level = 10)
self.bot.log(response,str(channelId))
if showImage:
if deleteImage:
try:
@ -152,7 +152,7 @@ class GameLoops():
response, showImage, deleteImage, gameDone, gwendoTurn = "An AI error ocurred",False,False,False,False
self.bot.log("AI error (error code 1520)")
await ctx.channel.send(response)
self.bot.log(response,str(channelId), level = 10)
self.bot.log(response,str(channelId))
if showImage:
if deleteImage:
await oldImage.delete()