mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
lol ma era così semplice
This commit is contained in:
parent
998593b334
commit
1e9c3ea0f8
1 changed files with 17 additions and 16 deletions
31
main.py
31
main.py
|
@ -68,21 +68,22 @@ async def overwatch_status_change(timeout):
|
||||||
# Update database
|
# Update database
|
||||||
db[player]["overwatch"]["level"] = level
|
db[player]["overwatch"]["level"] = level
|
||||||
# Check for rank changes
|
# Check for rank changes
|
||||||
# rank = r["data"]["competitive"]["rank"]
|
rank = r["data"]["competitive"]["rank"]
|
||||||
# if rank is not None:
|
if rank is not None:
|
||||||
# rank = int(rank)
|
rank = int(rank)
|
||||||
# try:
|
try:
|
||||||
# oldrank = int(db[player]["overwatch"]["rank"])
|
oldrank = int(db[player]["overwatch"]["rank"])
|
||||||
# except KeyError:
|
except KeyError:
|
||||||
# oldrank = 0
|
oldrank = 0
|
||||||
# if rank != oldrank:
|
if rank != oldrank:
|
||||||
# # Send the message
|
# Send the message
|
||||||
# loop.create_task(send_event(eventmsg=s.overwatch_rank_change,
|
loop.create_task(send_event(eventmsg=s.overwatch_rank_change,
|
||||||
# player=player, change=overwatch.format_rankchange(rank-oldrank),
|
player=player, change=overwatch.format_rankchange(rank-oldrank),
|
||||||
# rank=rank, medal=overwatch.url_to_medal(r["data"]["competitive"]["rank_img"])))
|
rank=rank, medal=overwatch.url_to_medal(r["data"]["competitive"]["rank_img"])))
|
||||||
# # Update database
|
# Update database
|
||||||
# db[player]["overwatch"]["rank"] = rank
|
db[player]["overwatch"]["season"] = 4
|
||||||
# else:
|
db[player]["overwatch"]["rank"] = rank
|
||||||
|
else:
|
||||||
db[player]["overwatch"]["rank"] = None
|
db[player]["overwatch"]["rank"] = None
|
||||||
save_db()
|
save_db()
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in a new issue