Compare commits
2 commits
aa6a4728ba
...
b78b029855
Author | SHA1 | Date | |
---|---|---|---|
b78b029855 | |||
a3ca746e86 |
1 changed files with 4 additions and 4 deletions
|
@ -76,25 +76,25 @@ def main(args):
|
||||||
steam_id = SteamID(steamid)
|
steam_id = SteamID(steamid)
|
||||||
except:
|
except:
|
||||||
await ctx.send(f"You failed to give a valid SteamID as it seems, please head to <https://steamid.xyz/> and check.", ephemeral=True)
|
await ctx.send(f"You failed to give a valid SteamID as it seems, please head to <https://steamid.xyz/> and check.", ephemeral=True)
|
||||||
logger.debug(f"User ({user.id}) has give a invalid SteamID. Could not convert!")
|
logger.debug(f"User {user.username} ({user.id}) has give a invalid SteamID. Could not convert! {steamid}")
|
||||||
return
|
return
|
||||||
|
|
||||||
if steam_id.isValid() == False:
|
if steam_id.isValid() == False:
|
||||||
await ctx.send(f"You failed to give a valid SteamID as it seems, please head to <https://steamid.xyz/> and check.", ephemeral=True)
|
await ctx.send(f"You failed to give a valid SteamID as it seems, please head to <https://steamid.xyz/> and check.", ephemeral=True)
|
||||||
logger.debug(f"User ({user.id}) has given a invalid SteamID!")
|
logger.debug(f"User {user.username} ({user.id}) has given a invalid SteamID! Value: {steamid}")
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
database.create_reserved_slot(mysql, user, steam_id.steam2(1))
|
database.create_reserved_slot(mysql, user, steam_id.steam2(1))
|
||||||
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)}`!")
|
||||||
logger.debug(f"{steam_id.steam2(1)} has just claimed a reserved slot.")
|
logger.debug(f"{user.id} with SteamID: {steam_id.steam2(1)} has just claimed a reserved slot.")
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
if str(err) != "Duplicate entrys":
|
if str(err) != "Duplicate entrys":
|
||||||
await ctx.send(f"Something failed with the database, please try again later.", ephemeral=True)
|
await ctx.send(f"Something failed with the database, please try again later.", ephemeral=True)
|
||||||
logger.warning(f"Error while trying to access database.", err)
|
logger.warning(f"Error while trying to access database.", err)
|
||||||
return
|
return
|
||||||
await ctx.send(f"You have already claimed a reserved slot!", ephemeral=True)
|
await ctx.send(f"You have already claimed a reserved slot!", ephemeral=True)
|
||||||
logger.debug(f"{steam_id.steam2(1)} or {user.id} is already in the database.")
|
logger.debug(f"{steam_id.steam2(1)} or User {user.username} ({user.id}) is already in the database.")
|
||||||
|
|
||||||
bot.start()
|
bot.start()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue