def main(): Data.create_tables() add_cogs() try: from bot import ipc_routes bot.ipc.start() bot.run(TOKEN) except KeyboardInterrupt: pass except SystemExit: pass finally: print("Exiting...") Data.conn.close()
async def on_ready(): global presence_task Data.create_tables() presence_task = bot.loop.create_task(update_presence()) print(f"Bot logged into {len(bot.guilds)} servers.")