mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +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
|
import json
|
||||||
|
|
||||||
# Get player database from the db.json file
|
# 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
|
# List overwatch players
|
||||||
players = list()
|
players = list()
|
||||||
for player in db:
|
for player in db:
|
||||||
if player["overwatch"] is not None:
|
if db[player]["overwatch"] is not None:
|
||||||
players.append(player["overwatch"])
|
players.append(db[player]["overwatch"])
|
||||||
|
|
||||||
# Get player data
|
# Get player data
|
||||||
async def get_player_data(platform: str, region: str, battletag: str):
|
async def get_player_data(platform: str, region: str, battletag: str):
|
||||||
|
|
Loading…
Reference in a new issue