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:
|
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)
|
||||||
|
|||||||
@ -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...')
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user