:Bug: Bot goes invisible when it's about to log out

This commit is contained in:
NikolajDanger
2021-04-02 20:54:48 +02:00
parent 33eedf8981
commit 4281d43f7a
2 changed files with 2 additions and 4 deletions

View File

@ -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):

View File

@ -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.")