This commit is contained in:
Nikolaj Danger
2020-08-06 15:20:26 +02:00
parent 3c5e3e3a0a
commit 1b1068c59c
6 changed files with 6 additions and 7 deletions

View File

@ -21,7 +21,7 @@ class GamesCog(commands.Cog):
else: else:
new_message = ctx.message.author.display_name + " has " + str(response) + " GwendoBucks" new_message = ctx.message.author.display_name + " has " + str(response) + " GwendoBucks"
await ctx.send(new_message) await ctx.send(new_message)
# Gives another user an amount of GwendoBucks # Gives another user an amount of GwendoBucks
@commands.command() @commands.command()
async def give(self, ctx, *, content): async def give(self, ctx, *, content):

View File

@ -9,7 +9,7 @@ class SwCog(commands.Cog):
def __init__(self,client): def __init__(self,client):
self.client = client self.client = client
# Rolls star wars dice # Rolls star wars dice
@commands.command() @commands.command()
async def swroll(self, ctx, *, content): async def swroll(self, ctx, *, content):

View File

@ -121,8 +121,7 @@ def drawImage(channel):
winBar = winBar.rotate(diagonalAngle,expand=1) winBar = winBar.rotate(diagonalAngle,expand=1)
startx -= placeGridSize[0]*3 + border startx -= placeGridSize[0]*3 + border
starty -= gridBorder + border starty -= gridBorder + border
mask = winBar.copy()#.convert("L") mask = winBar.copy()#.convert("L")
#mask.putalpha(128) #mask.putalpha(128)
#mask.save("test.png") #mask.save("test.png")

View File

@ -24,7 +24,7 @@ def addMoney(user,amount):
data[user]["money"] = points + amount data[user]["money"] = points + amount
else: else:
logThis("Error adding money") logThis("Error adding money")
with open("resources/users.json", "w") as f: with open("resources/users.json", "w") as f:
json.dump(data,f,indent=4) json.dump(data,f,indent=4)

View File

@ -165,7 +165,7 @@ def makeFolder(path):
def makeFiles(): def makeFiles():
with open("resources/startingFiles.json") as f: with open("resources/startingFiles.json") as f:
data = json.load(f) data = json.load(f)
for path, content in data["json"].items(): for path, content in data["json"].items():
makeJsonFile(path,content) makeJsonFile(path,content)

View File

@ -207,7 +207,7 @@ async def runMonopoly(channel, command, user):
oldImage = await channel.send(file = discord.File("resources/games/monopolyBoards/monopolyBoard"+str(channel.id)+".png")) 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: with open("resources/games/oldImages/monopoly"+str(channel.id), "w") as f:
f.write(str(oldImage.id)) f.write(str(oldImage.id))
if gameContinue: if gameContinue:
if gameStarted: if gameStarted:
await asyncio.sleep(60) await asyncio.sleep(60)