Fixing ugly exit with adding a clean interrupt exit.
This commit is contained in:
parent
a3cd1fceb0
commit
30ca9bc559
1 changed files with 6 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue