fix output messages, and remove debug prints

This commit is contained in:
Philipp 2022-09-20 01:48:06 +02:00
parent 2cc81b2ff0
commit 36a89ac640
Signed by: Spaenny
GPG Key ID: 9EBD8439AFBAB750
1 changed files with 2 additions and 4 deletions

View File

@ -51,7 +51,7 @@ async def reserve_slot(ctx: interactions.CommandContext, steamid: str):
steam_id = SteamID(steamid)
user = ctx.user
if steam_id.isValid() == True:
#try:
try:
sql_sm = "INSERT INTO sm_admins (authtype, identity, password, flags, name, immunity) VALUES (%s, %s, %s, %s, %s, %s)"
val_sm = ("steam", steam_id.steam2(1), "", "a", user.username, "5")
cursor.execute(sql_sm, val_sm)
@ -60,13 +60,11 @@ async def reserve_slot(ctx: interactions.CommandContext, steamid: str):
id = cursor.lastrowid
sql_discord = "INSERT INTO discord_link (admin_id, discord_id, steamid) VALUES (%s, %s, %s)"
print(id, user.id, steam_id.steam2(1))
val_discord = (id, str(user.id), steam_id.steam2(1))
cursor.execute(sql_discord, val_discord)
db.commit()
await ctx.send(f"You just claimed a reserved slot for: `{steam_id.steam2(1)}`!")
#except:
except:
await ctx.send(f"Something failed with the database, please try again later.")
else: