diff --git a/cogs/MiscCog.py b/cogs/MiscCog.py index 4718019..e6db9a0 100644 --- a/cogs/MiscCog.py +++ b/cogs/MiscCog.py @@ -34,11 +34,11 @@ class MiscCog(commands.Cog): async def log(self, ctx, *, content): logThis(content,str("Logged by "+ctx.message.author.display_name)) - # Stops the bot + # Restarts the bot @commands.command(hidden = True) - async def stop(self, ctx): + async def restart(self, ctx): if "#"+str(ctx.message.author.id) in ["#266269899859427329", "#380732645602230272"]: - await ctx.send("Logging out...") + await ctx.send("Pulling git repo and restarting...") stopServer() diff --git a/funcs/games/hangmanDraw.py b/funcs/games/hangmanDraw.py index 4eaf85d..268ce67 100644 --- a/funcs/games/hangmanDraw.py +++ b/funcs/games/hangmanDraw.py @@ -169,7 +169,7 @@ def drawGallows(): def drawImage(channel): with open("resources/games/hangmanGames.json", "r") as f: data = json.load(f) - + random.seed(data[channel]["game ID"]) background = Image.new("RGBA",(1600,1000),color=backgroundColor) diff --git a/funcs/miscFuncs.py b/funcs/miscFuncs.py index 893abb8..9157f3b 100644 --- a/funcs/miscFuncs.py +++ b/funcs/miscFuncs.py @@ -7,6 +7,7 @@ import time # Used for logging import logging # Used for... you know... logging import wikia # Used by findWikiPage import os # Used by makeFiles +import git # Used by stopServer() logging.basicConfig(filename="gwendolyn.log", level=logging.INFO) @@ -255,6 +256,9 @@ def stopServer(): with open("resources/games/hangmanGames.json", "w") as f: json.dump(emptyDict,f,indent=4) + g = git.cmd.Git("") + g.pull() + def deleteGame(gameType,channel): with open("resources/games/games.json", "r") as f: data = json.load(f)