mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
19 lines
321 B
Python
19 lines
321 B
Python
import json
|
|
|
|
db = json.load("db.json")
|
|
|
|
|
|
def findbyname(name: str):
|
|
for player in db:
|
|
if player == name:
|
|
return db[player]
|
|
else:
|
|
return None
|
|
|
|
|
|
def findbykey(key, value):
|
|
for player in db:
|
|
if player[key] == value:
|
|
return db[player]
|
|
else:
|
|
return None
|