From f89d789ecd75415ef669fadab5a256850ffde618 Mon Sep 17 00:00:00 2001 From: JaWarrior12 Date: Sat, 7 Sep 2024 15:49:56 -0400 Subject: [PATCH 1/3] Save --- cogs/plexusSystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/plexusSystem.py b/cogs/plexusSystem.py index cb6d61e4..995b705f 100644 --- a/cogs/plexusSystem.py +++ b/cogs/plexusSystem.py @@ -233,7 +233,7 @@ def writeToFile(sourceDict,sectionTitle,stateVar): if sum(1 for _ in logFile)==0: logFile.write(f"--\\/--{sectionTitle}--\\/--\n") else: - logFile.write(f"\n\n--\/--{sectionTitle}--\/--\n") + logFile.write(f"\n\n--\\/--{sectionTitle}--\\/--\n") shipTotalsKeys=list(sourceDict.keys()) for hex in shipTotalsKeys: shipLogs=sourceDict[hex] From ce4c1b99cf3a1ccb6b954447cdb3dc8d8652cfe6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 01:50:36 +0000 Subject: [PATCH 2/3] Bump pytz from 2024.1 to 2024.2 Bumps [pytz](https://github.com/stub42/pytz) from 2024.1 to 2024.2. - [Release notes](https://github.com/stub42/pytz/releases) - [Commits](https://github.com/stub42/pytz/compare/release_2024.1...release_2024.2) --- updated-dependencies: - dependency-name: pytz dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 22dacd05..01ca7ea0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -751,13 +751,13 @@ files = [ [[package]] name = "pytz" -version = "2024.1" +version = "2024.2" description = "World timezone definitions, modern and historical" optional = false python-versions = "*" files = [ - {file = "pytz-2024.1-py2.py3-none-any.whl", hash = "sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319"}, - {file = "pytz-2024.1.tar.gz", hash = "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812"}, + {file = "pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725"}, + {file = "pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a"}, ] [[package]] @@ -1026,4 +1026,4 @@ test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-it [metadata] lock-version = "2.0" python-versions = ">=3.8.0,<3.9" -content-hash = "b37c583f682b050df47838c97114240fe41e0ceca2daab5c830d6b25cee3dd35" +content-hash = "04d5decfd14a10e6d30e3ff4cb9eebb858cbfd6f3cc90c558c6882eb0ed705ac" diff --git a/pyproject.toml b/pyproject.toml index 5a4b63a3..f2bbc82b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ python = ">=3.8.0,<3.9" numpy = "^1.24.4" discord = "^2.3.2" Flask = "^3.0.3" -pytz = "^2024.1" +pytz = "^2024.2" httpsproxy_urllib2 = "^1.0" requests = "^2.32.3" APScheduler = "^3.10.4" From b75c03e5c28b26233892ab492905e2611cbc7933 Mon Sep 17 00:00:00 2001 From: JaWarrior12 Date: Wed, 9 Oct 2024 21:26:54 -0400 Subject: [PATCH 3/3] save 10/9/24 --- cogs/devcmds.py | 10 +++++++++- startup.py | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/cogs/devcmds.py b/cogs/devcmds.py index 6a5cd01f..6b120715 100644 --- a/cogs/devcmds.py +++ b/cogs/devcmds.py @@ -38,6 +38,14 @@ def cog_unload(self): #print(1) self.backupdaily.cancel() + @commands.command(name="forceClose",brief="Force Closes Bot Connection") + async def forceClose(self,ctx): + if ctx.message.author.id in developers: + await ctx.send("Closing Bot...") + await self.bot.close() + else: + pass + @commands.command(name='shutdown',brief="Shuts down and restarts New Light", help="Shuts Down and Restarts New Light. Args: None") async def shutdown(self,ctx,msg=None): if ctx.message.author.id in developers: @@ -51,8 +59,8 @@ async def shutdown(self,ctx,msg=None): print('Backing Up Data') print('Shutting Down') await ctx.send('Shutting Down New Light') - startup() await self.bot.close() + await startup() #await main.bot.logout() else: print(ctx.message.author.id) diff --git a/startup.py b/startup.py index d5bc2dc2..e24dee5c 100644 --- a/startup.py +++ b/startup.py @@ -2,10 +2,11 @@ import pytz import datetime import os, discord +import asyncio from discord.ext import commands -def startup(): - time.sleep(5) +async def startup(): + asyncio.sleep(5) print("Starting Back Up") os.system('py main.py')