mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Fixed db load function
This commit is contained in:
parent
b5e2a96c73
commit
6e7d702c00
1 changed files with 5 additions and 3 deletions
|
@ -3,13 +3,15 @@ import requests
|
|||
import json
|
||||
|
||||
# Get player database from the db.json file
|
||||
db = json.load("db.json")
|
||||
file = open("db.json")
|
||||
db = json.load(file)
|
||||
file.close()
|
||||
|
||||
# List overwatch players
|
||||
players = list()
|
||||
for player in db:
|
||||
if player["overwatch"] is not None:
|
||||
players.append(player["overwatch"])
|
||||
if db[player]["overwatch"] is not None:
|
||||
players.append(db[player]["overwatch"])
|
||||
|
||||
# Get player data
|
||||
async def get_player_data(platform: str, region: str, battletag: str):
|
||||
|
|
Loading…
Reference in a new issue