Merge pull request #63 from jmaliksi/jm_real_stats
Pull real stats if present
This commit is contained in:
commit
78172f6128
|
@ -5,7 +5,7 @@ import database as db
|
|||
|
||||
|
||||
onomancer_url = "https://onomancer.sibr.dev/api/"
|
||||
name_stats_hook = "generateStats2?name="
|
||||
name_stats_hook = "getOrGenerateStats?name="
|
||||
collection_hook = "getCollection?token="
|
||||
|
||||
def get_stats(name):
|
||||
|
@ -35,4 +35,4 @@ def get_collection(collection_url):
|
|||
for player in response.json()['lineup'] + response.json()['rotation']:
|
||||
db.cache_stats(player['name'], json.dumps(player))
|
||||
|
||||
return json.dumps(response.json())
|
||||
return json.dumps(response.json())
|
||||
|
|
|
@ -189,6 +189,7 @@ if you did it correctly, you'll get a team embed with a prompt to confirm. hit t
|
|||
|
||||
async def execute(self, msg, command):
|
||||
if db.get_team(command.split('\n',1)[1].split("\n")[0]) == None:
|
||||
await msg.channel.send(f"Fetching players...")
|
||||
team = team_from_message(command)
|
||||
save_task = asyncio.create_task(save_team_confirm(msg, team))
|
||||
await save_task
|
||||
|
|
Loading…
Reference in New Issue
Block a user