Commit 8dac27ec authored by Trevor Cappallo's avatar Trevor Cappallo
Browse files

detect completed games using score field

parent c50e9136
......@@ -93,6 +93,12 @@ async def status_task():
newGames = [x for x in newGames if sorted([str(y) for y in x.values()]) not in oldGames]
out=[]
nix=[]
for game in info['games']:
if "..." not in game['score'] and " -- " not in game['score']:
out += [f"The {game['name']} game is finished. The final score was {game['score']}."]
if game['name'] in currentGames.keys():
del currentGames[game['name']]
for ongoing in currentGames.keys():
if ongoing not in [x['name'] for x in info['games']]:
out += [f"The {ongoing} game is finished. Final score: {currentGames[ongoing]['score']}"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment