From 9993023c7ef5fd1f6992ecf8bbd38ebcc5c96bd7 Mon Sep 17 00:00:00 2001 From: Terry Hearst Date: Tue, 13 Sep 2022 23:24:26 -0400 Subject: [PATCH] Cleaned initial printing --- bot.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bot.py b/bot.py index 0a297c4..426c162 100644 --- a/bot.py +++ b/bot.py @@ -16,13 +16,11 @@ class Bot(commands.Bot): self.db_cur = self.db_con.cursor() if self.db_cur.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='custom_commands'").fetchone() == None: - print("Created database table") self.db_cur.execute("CREATE TABLE custom_commands(command, output_text)") - - commands = self.db_cur.execute("SELECT * FROM custom_commands").fetchall() - if len(commands) > 0: - print("Loaded custom commands:") - print(commands) + print("Created database table") + else: + commands = self.db_cur.execute("SELECT * FROM custom_commands").fetchall() + print(f"{len(commands)} custom commands available") async def event_ready(self): print(f"Logged in as | {self.nick}")