Update gameplay.py

Fix post-game scorebug typo; add game_type to reliever check
This commit is contained in:
Cal Corum 2023-02-26 20:00:33 -06:00
parent c97cb3c5d7
commit 008a2e5bab

View File

@ -1660,7 +1660,16 @@ class Gameplay(commands.Cog):
f'{inning}',
winning_team
)
embed.description = f'Score Report - {"Ranked" if this_game.ranked else "Unlimited"} ' \
if this_game.game_type == 'major-league':
game_des = 'Major League'
elif this_game.game_type == 'minor-league':
game_des = 'Minor League'
elif this_game.ranked:
game_des = 'Ranked'
else:
game_des = 'Unlimited'
embed.description = f'Score Report - {game_des} ' \
f'{"- 3-Inning Game" if this_game.short_game else " - 9-Inning Game"}'
embed.add_field(
name='Box Score',
@ -2238,7 +2247,7 @@ class Gameplay(commands.Cog):
used_pitchers = await get_team_lineups(
game_id=this_play.game.id, team_id=ai_team['id'], inc_inactive=True, pitchers_only=True, as_string=False
)
make_sub(ai_manager.get_relief_pitcher(this_play, ai_team, used_pitchers))
make_sub(ai_manager.get_relief_pitcher(this_play, ai_team, used_pitchers, this_game.game_type))
await interaction.edit_original_response(
content=None,
embed=await self.get_game_state_embed(this_game)