fix(makeprompt.py): add exception handling and raise exception instead of pass

This commit is contained in:
Paillat
2023-05-05 13:31:56 +02:00
parent 88e9acba80
commit 380165fa07

View File

@@ -61,7 +61,8 @@ def get_guild_data(message):
curs_premium.execute( curs_premium.execute(
"SELECT * FROM data WHERE guild_id = ?", (guid,) "SELECT * FROM data WHERE guild_id = ?", (guid,)
) # get the data of the guild ) # get the data of the guild
except: except Exception as e:
raise e
pass pass
try: try:
@@ -77,7 +78,8 @@ def get_guild_data(message):
# [2] # get the premium status of the guild # [2] # get the premium status of the guild
data = curs_premium.fetchone() data = curs_premium.fetchone()
premium = data[2] premium = data[2]
except: except Exception as e:
raise e
premium = 0 # if the guild is not in the database, it's not premium premium = 0 # if the guild is not in the database, it's not premium
try: try: