🚧 Started on 4 in a row game

This commit is contained in:
NikolajDanger
2020-07-28 22:10:23 +02:00
parent 44a6ef65ca
commit 94c6289cc1
10 changed files with 148 additions and 10 deletions

View File

@ -63,6 +63,7 @@ async def on_message(message):
data["trivia questions"] = {}
data["blackjack games"] = {}
data["4 in a row games"] = {}
with open("resources/games/games.json","w") as f:
json.dump(data,f,indent=4)
@ -326,7 +327,7 @@ async def on_message(message):
new_message = "Blackjack game started. Use \"!blackjack bet [amount]\" to enter the game within the next 30 seconds."
await message.channel.send(new_message)
old_image = await message.channel.send(file = discord.File("resources/games/tables/blackjackTable"+str(message.channel)+".png"))
old_image = await message.channel.send(file = discord.File("resources/games/blackjackTables/blackjackTable"+str(message.channel)+".png"))
await asyncio.sleep(30)
@ -344,7 +345,7 @@ async def on_message(message):
await message.channel.send(new_message)
if gamedone == False:
await old_image.delete()
old_image = await message.channel.send(file = discord.File("resources/games/tables/blackjackTable"+str(message.channel)+".png"))
old_image = await message.channel.send(file = discord.File("resources/games/blackjackTables/blackjackTable"+str(message.channel)+".png"))
if allStanding:
await asyncio.sleep(5)
else:
@ -412,6 +413,15 @@ async def on_message(message):
else:
await message.channel.send("I didn't quite understand that")
elif message.content.lower().startswith("!fourinarow"):
funcs.logThis(message.author.display_name+" ran \""+message.content+"\"")
response, showImage = funcs.decipherCommand(message.content.lower().replace("!fourinarow",""),str(message.channel),message.author.display_name)
await message.channel.send(response)
funcs.logThis(response)
if showImage:
await message.channel.send(file = discord.File("resources/games/4InARowBoards/board"+str(message.channel)+".png"))
# Is a bit sassy sometimes
meanWords = ["stupid", "bitch", "fuck", "dumb", "idiot"]