mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
else
This commit is contained in:
parent
854cd092a2
commit
32eb09dace
1 changed files with 19 additions and 18 deletions
37
database.py
37
database.py
|
@ -134,25 +134,26 @@ async def update_lol(discord_id):
|
|||
account.flexq_division = None
|
||||
account.ttq_tier = None
|
||||
account.ttq_division = None
|
||||
# Update the user data
|
||||
if soloq is not None:
|
||||
account.soloq_tier = lol.tiers.index(soloq["tier"])
|
||||
account.soloq_division = lol.divisions.index(soloq["entries"][0]["division"])
|
||||
else:
|
||||
account.soloq_tier = None
|
||||
account.soloq_division = None
|
||||
if flexq is not None:
|
||||
account.flexq_tier = lol.tiers.index(flexq["tier"])
|
||||
account.flexq_division = lol.divisions.index(flexq["entries"][0]["division"])
|
||||
else:
|
||||
account.flexq_tier = None
|
||||
account.flexq_division = None
|
||||
if ttq is not None:
|
||||
account.ttq_tier = lol.tiers.index(ttq["tier"])
|
||||
account.ttq_division = lol.divisions.index(ttq["entries"][0]["division"])
|
||||
else:
|
||||
account.ttq_tier = None
|
||||
account.ttq_division = None
|
||||
# Update the user data
|
||||
if soloq is not None:
|
||||
account.soloq_tier = lol.tiers.index(soloq["tier"])
|
||||
account.soloq_division = lol.divisions.index(soloq["entries"][0]["division"])
|
||||
else:
|
||||
account.soloq_tier = None
|
||||
account.soloq_division = None
|
||||
if flexq is not None:
|
||||
account.flexq_tier = lol.tiers.index(flexq["tier"])
|
||||
account.flexq_division = lol.divisions.index(flexq["entries"][0]["division"])
|
||||
else:
|
||||
account.flexq_tier = None
|
||||
account.flexq_division = None
|
||||
if ttq is not None:
|
||||
account.ttq_tier = lol.tiers.index(ttq["tier"])
|
||||
account.ttq_division = lol.divisions.index(ttq["entries"][0]["division"])
|
||||
else:
|
||||
account.ttq_tier = None
|
||||
account.ttq_division = None
|
||||
# Mark the user as updated
|
||||
account.last_updated = datetime.datetime.now()
|
||||
# Commit the changes
|
||||
|
|
Loading…
Reference in a new issue