From 41c924a9efb7f2edce5d9ee047cb503f9588ab10 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Sat, 26 Dec 2020 21:06:33 -0500 Subject: [PATCH] fixed some bad attribute calls and amended the extra innings calc to account for the ghost inning at the end of games --- the_prestige.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/the_prestige.py b/the_prestige.py index 13130f4..9e9113a 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -411,10 +411,10 @@ async def watch_game(channel, game): new_embed.add_field(name=newgame.teams['home'].name, value=newgame.teams['home'].score, inline=True) if top_of_inning: - new_embed.add_field(name="Inning:", value=f"🔼 {newgame.inning} / {newgame.max_inning}", inline=True) + new_embed.add_field(name="Inning:", value=f"🔼 {newgame.inning} / {newgame.max_innings}", inline=True) new_embed.set_footer(text=f"{newgame.teams['away'].name} batting.") else: - new_embed.add_field(name="Inning:", value=f"🔽 {newgame.inning} / {newgame.max_inning}", inline=True) + new_embed.add_field(name="Inning:", value=f"🔽 {newgame.inning} / {newgame.max_innings}", inline=True) new_embed.set_footer(text=f"{newgame.teams['home'].name} batting.") new_embed.add_field(name="Outs:", value=f"{str(out_emoji)*newgame.outs+str(in_emoji)*(2-newgame.outs)}", inline=False) @@ -429,7 +429,7 @@ async def watch_game(channel, game): new_embed.set_field_at(4, name="Pitcher:", value="-", inline=False) new_embed.set_field_at(5, name="Batter:", value="-", inline=False) if newgame.top_of_inning: - new_embed.set_field_at(2,name="Inning:",value=f"🔽 {newgame.inning-1} / {newgame.max_inning}") + new_embed.set_field_at(2,name="Inning:",value=f"🔽 {newgame.inning-1} / {newgame.max_innings}") if pause == 1: if newgame.top_of_inning: @@ -481,8 +481,8 @@ async def watch_game(channel, game): await asyncio.sleep(6) title_string = f"{newgame.teams['away'].name} at {newgame.teams['home'].name} ended after {newgame.inning} innings" - if newgame.inning > newgame.max_innings: #if extra innings - title_string += f" with {newgame.inning - newgame.max_innings} extra innings." + if newgame.inning > (newgame.max_innings - 1): #if extra innings + title_string += f" with {newgame.inning - (newgame.max_innings-1)} extra innings." else: title_string += "."