From 0fa9f583e0d24851000a720d284af5501daa7ab7 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 13 Aug 2016 20:06:47 +0200 Subject: [PATCH] Bugfix in level check --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 4201a72d..9ae5e7c7 100644 --- a/main.py +++ b/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()