Update reboot command and bot.close

This commit is contained in:
Dustin Pianalto 2019-12-24 00:12:37 -09:00
parent e1f365a1e8
commit 4d139d25c2
2 changed files with 3 additions and 8 deletions

View File

@ -21,7 +21,7 @@ class Admin(commands.Cog):
with open(f'{self.bot.config_dir}/restart', 'w') as f: with open(f'{self.bot.config_dir}/restart', 'w') as f:
f.write(f'1\n{ctx.channel.id}') f.write(f'1\n{ctx.channel.id}')
admin_logger.info("Rebooting") admin_logger.info("Rebooting")
sys.exit() await self.bot.close()
# TODO Fix view_code # TODO Fix view_code
@commands.command(hidden=True) @commands.command(hidden=True)

View File

@ -146,11 +146,6 @@ class Geeksbot(commands.Bot):
return ctx return ctx
async def close(self): async def close(self):
try: await self.aio_session.close()
await self.aio_session.close() await super().close()
await super().close()
sys.exit()
except Exception:
geeksbot_logger.exception(f"Error Closing Connections.")
geeksbot_logger.info('Exiting...') geeksbot_logger.info('Exiting...')