Removing more stuff relating to stuff still in development.

This commit is contained in:
NikolajDanger
2021-03-28 15:53:51 +02:00
parent 0ca0dcfb30
commit cdf2d7776e
14 changed files with 0 additions and 115 deletions

View File

@@ -92,48 +92,6 @@ class GameLoops():
self.bot.funcs.deleteGame("4 in a row games",str(channel.id))
async def runMonopoly(self,channel, command, user):
#try:
response, showImage, deleteImage, gameStarted, gameContinue = self.bot.monopoly.parseMonopoly(command,str(channel.id),user)
#except:
# logThis("Error parsing command (error code 1610)")
if response != "":
await channel.send(response)
logThis(response,str(channel.id))
if showImage:
if deleteImage:
try:
oldImage = await self.deleteMessage("monopoly"+str(channel.id),channel)
except:
logThis("Error deleting message (error code 1601)")
oldImage = await channel.send(file = discord.File("resources/games/monopolyBoards/monopolyBoard"+str(channel.id)+".png"))
with open("resources/games/oldImages/monopoly"+str(channel.id), "w") as f:
f.write(str(oldImage.id))
if gameContinue:
if gameStarted:
await asyncio.sleep(60)
else:
await asyncio.sleep(3)
response, showImage, deleteImage, gameDone = self.bot.monopoly.monopolyContinue(str(channel.id))
em = discord.Embed(description=response,colour = 0x59f442)
await channel.send(embed=em)
if deleteImage:
try:
oldImage = await self.deleteMessage("monopoly"+str(channel.id),channel)
except:
logThis("Error deleting message (error code 1601)")
if showImage:
oldImage = await channel.send(file = discord.File("resources/games/monopolyBoards/monopolyBoard"+str(channel.id)+".png"))
with open("resources/games/oldImages/monopoly"+str(channel.id), "w") as f:
f.write(str(oldImage.id))
if gameDone == False:
try:
await oldImage.add_reaction("🎲")
except:
logThis("Image deleted before I could react to all of them")
async def runHangman(self,channel,user,command = "start"):
try:
response, showImage, deleteImage, remainingLetters = self.bot.hangman.parseHangman(str(channel.id),user,command)
@@ -210,39 +168,3 @@ class GameLoops():
self.bot.money.addMoney(game["players"][winner-1].lower(),winnings)
self.bot.funcs.deleteGame("hex games",str(channel.id))
# Runs Love letter
async def runLoveletter(self,channel,command,user,userchannel):
try:
response, showImage, deleteImage = self.bot.loveletter.parseLove(command,str(channel.id),user,userchannel)
except:
logThis("Error parsing command (error code 1810)")
await channel.send(response)
logThis(response,str(channel.id))
if showImage:
if deleteImage:
await self.deleteMessage("loveletter"+str(channel.id),channel)
oldImage = await channel.send(file = discord.File("resources/games/loveletterBoards/loveletterBoard"+str(channel.id)+".png"))
if len(remainingLetters) > 15:
otherMessage = await channel.send("_ _")
reactionMessages = {oldImage : remainingLetters[:15],otherMessage : remainingLetters[15:]}
else:
otherMessage = ""
reactionMessages = {oldImage : remainingLetters}
oldMessages = str(oldImage.id)
if otherMessage != "":
oldMessages += "\n"+str(otherMessage.id)
with open("resources/games/oldImages/hangman"+str(channel.id), "w") as f:
f.write(oldMessages)
try:
for message, letters in reactionMessages.items():
for letter in letters:
emoji = chr(ord(letter)+127397)
await message.add_reaction(emoji)
except:
logThis("Image deleted before adding all reactions")