From 6835bf53586babc2a8c3272dafcc475069b1e929 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 24 Sep 2022 22:37:54 +0200 Subject: [PATCH] fixed crashing when no arg is given --- src/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.py b/src/main.py index 5144874..78a8a4a 100644 --- a/src/main.py +++ b/src/main.py @@ -17,8 +17,12 @@ def main(args): bot = interactions.Client(token=token) mysql = database.create_connection(host, user, password, db) - if args[0] == "init_database": - database.init_test_database(mysql) + try: + if args[0] == "init_database": + database.init_test_database(mysql) + except: + print("Skipping database init...") + pass @bot.command( name="reserve_slot",