Fixing ugly exit with adding a clean interrupt exit.

This commit is contained in:
Elijah Lazkani 2018-03-17 10:50:04 -04:00
parent a3cd1fceb0
commit 30ca9bc559

View file

@ -161,7 +161,12 @@ def main():
bot.loop.create_task(bot.connect())
asyncio.ensure_future(plugins(bot))
bot.loop.run_forever()
try:
bot.loop.run_forever()
except KeyboardInterrupt:
bot.loop.stop()
bot.loop.close()