Update reboot command and bot.close
This commit is contained in:
parent
e1f365a1e8
commit
4d139d25c2
@ -21,7 +21,7 @@ class Admin(commands.Cog):
|
||||
with open(f'{self.bot.config_dir}/restart', 'w') as f:
|
||||
f.write(f'1\n{ctx.channel.id}')
|
||||
admin_logger.info("Rebooting")
|
||||
sys.exit()
|
||||
await self.bot.close()
|
||||
|
||||
# TODO Fix view_code
|
||||
@commands.command(hidden=True)
|
||||
|
||||
@ -146,11 +146,6 @@ class Geeksbot(commands.Bot):
|
||||
return ctx
|
||||
|
||||
async def close(self):
|
||||
try:
|
||||
await self.aio_session.close()
|
||||
await super().close()
|
||||
sys.exit()
|
||||
except Exception:
|
||||
geeksbot_logger.exception(f"Error Closing Connections.")
|
||||
await self.aio_session.close()
|
||||
await super().close()
|
||||
geeksbot_logger.info('Exiting...')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user