Update gameplay.py
Fix post-game scorebug typo; add game_type to reliever check
This commit is contained in:
parent
c97cb3c5d7
commit
008a2e5bab
@ -1660,7 +1660,16 @@ class Gameplay(commands.Cog):
|
|||||||
f'{inning}',
|
f'{inning}',
|
||||||
winning_team
|
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"}'
|
f'{"- 3-Inning Game" if this_game.short_game else " - 9-Inning Game"}'
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
name='Box Score',
|
name='Box Score',
|
||||||
@ -2238,7 +2247,7 @@ class Gameplay(commands.Cog):
|
|||||||
used_pitchers = await get_team_lineups(
|
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
|
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(
|
await interaction.edit_original_response(
|
||||||
content=None,
|
content=None,
|
||||||
embed=await self.get_game_state_embed(this_game)
|
embed=await self.get_game_state_embed(this_game)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user