From 4281d43f7a489337f354a7205a93b5bc259f2f0c Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Fri, 2 Apr 2021 20:54:48 +0200 Subject: [PATCH] :Bug: Bot goes invisible when it's about to log out --- cogs/EventCog.py | 4 ---- cogs/MiscCog.py | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cogs/EventCog.py b/cogs/EventCog.py index 34388b1..337e09e 100644 --- a/cogs/EventCog.py +++ b/cogs/EventCog.py @@ -10,10 +10,6 @@ class EventCog(commands.Cog): async def on_ready(self): await self.bot.eventHandler.on_ready() - @commands.Cog.listener() - async def on_disconnect(self): - await self.bot.change_presence(status = discord.Status.offline) - # Logs when user sends a command @commands.Cog.listener() async def on_slash_command(self, ctx): diff --git a/cogs/MiscCog.py b/cogs/MiscCog.py index 7ac34bf..2fb6be0 100644 --- a/cogs/MiscCog.py +++ b/cogs/MiscCog.py @@ -33,6 +33,8 @@ class MiscCog(commands.Cog): if "#"+str(ctx.author.id) in self.bot.options.admins: await ctx.send("Pulling git repo and restarting...") + await self.bot.change_presence(status = discord.Status.offline) + self.bot.databaseFuncs.stopServer() self.bot.log("Logging out.")