From ce876839577c0c5d5a9ac12d7e696938d25c35a0 Mon Sep 17 00:00:00 2001 From: joe Date: Tue, 29 Dec 2020 13:10:57 -0800 Subject: [PATCH] Pull real stats if present --- onomancer.py | 4 ++-- the_prestige.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/onomancer.py b/onomancer.py index c5fbe14..f270a48 100644 --- a/onomancer.py +++ b/onomancer.py @@ -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()) \ No newline at end of file + return json.dumps(response.json()) diff --git a/the_prestige.py b/the_prestige.py index a1703ae..ccc40c1 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -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