fix output messages, and remove debug prints
This commit is contained in:
parent
2cc81b2ff0
commit
36a89ac640
1 changed files with 2 additions and 4 deletions
|
@ -51,7 +51,7 @@ async def reserve_slot(ctx: interactions.CommandContext, steamid: str):
|
||||||
steam_id = SteamID(steamid)
|
steam_id = SteamID(steamid)
|
||||||
user = ctx.user
|
user = ctx.user
|
||||||
if steam_id.isValid() == True:
|
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)"
|
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")
|
val_sm = ("steam", steam_id.steam2(1), "", "a", user.username, "5")
|
||||||
cursor.execute(sql_sm, val_sm)
|
cursor.execute(sql_sm, val_sm)
|
||||||
|
@ -60,13 +60,11 @@ async def reserve_slot(ctx: interactions.CommandContext, steamid: str):
|
||||||
id = cursor.lastrowid
|
id = cursor.lastrowid
|
||||||
|
|
||||||
sql_discord = "INSERT INTO discord_link (admin_id, discord_id, steamid) VALUES (%s, %s, %s)"
|
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))
|
val_discord = (id, str(user.id), steam_id.steam2(1))
|
||||||
cursor.execute(sql_discord, val_discord)
|
cursor.execute(sql_discord, val_discord)
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
await ctx.send(f"You just claimed a reserved slot for: `{steam_id.steam2(1)}`!")
|
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.")
|
await ctx.send(f"Something failed with the database, please try again later.")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue