mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Bugfix in level check
This commit is contained in:
parent
d67ca94c77
commit
0fa9f583e0
1 changed files with 3 additions and 3 deletions
6
main.py
6
main.py
|
@ -117,13 +117,13 @@ async def league_level_up(timeout):
|
|||
print("[League] Request rejected for rate limit.")
|
||||
else:
|
||||
# Check for level changes
|
||||
if "level" not in db[player]["league"] or r["level"] > db[player]["league"]["level"]:
|
||||
if "level" not in db[player]["league"] or r["summonerLevel"] > db[player]["league"]["level"]:
|
||||
# Send the message
|
||||
loop.create_task(send_event(eventmsg=s.league_level_up,
|
||||
player=player,
|
||||
level=r["level"]))
|
||||
level=r["summonerLevel"]))
|
||||
# Update database
|
||||
db[player]["league"]["level"] = r["level"]
|
||||
db[player]["league"]["level"] = r["summonerLevel"]
|
||||
f = open("db.json", "w")
|
||||
json.dump(db, f)
|
||||
f.close()
|
||||
|
|
Loading…
Reference in a new issue