From ee8a92ad3ae3e8e783d7b120bf9b3a0d65e5cb76 Mon Sep 17 00:00:00 2001 From: profitroll Date: Sun, 26 May 2024 15:02:44 +0200 Subject: [PATCH] Main now exists after migration --- main.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 675f8ac..8083a70 100644 --- a/main.py +++ b/main.py @@ -46,15 +46,17 @@ with contextlib.suppress(ImportError): def main(): + # Remove if no database is being used + if args.migrate: + migrate_database() + logger.info("Migration finished. Exiting...") + exit() + client = PyroClient( scheduler=scheduler, commands_source=sync.json_read(Path("commands.json")) ) # Conversation(client) - # Remove if no database is being used - if args.migrate: - migrate_database() - try: client.run() except KeyboardInterrupt: