fixed crashing when no arg is given

This commit is contained in:
Philipp 2022-09-24 22:37:54 +02:00
parent c09b1e4a30
commit 6835bf5358
Signed by: Spaenny
GPG Key ID: 9EBD8439AFBAB750
1 changed files with 6 additions and 2 deletions

View File

@ -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",