Update gameplay.py

Add catcher to gamestate embed when there are baserunners
This commit is contained in:
Cal Corum 2023-09-11 18:01:11 -05:00
parent 4031767f82
commit ae699ead4d

View File

@ -396,9 +396,19 @@ class Gameplay(commands.Cog):
if game_state['curr_play'].on_third:
runner = await get_player(game, game_state['curr_play'].on_third)
baserunner_string += f'On Third: {player_link(game, runner)}\n'
embed.add_field(
name='Baserunners', value=baserunner_string if len(baserunner_string) > 0 else 'None', inline=False
)
if len(baserunner_string) > 0:
embed.add_field(name=' ', value=' ', inline=False)
embed.add_field(
name='Baserunners', value=baserunner_string
)
embed.add_field(
name='Catcher', value=f'{player_link(game, game_state["catcher"])}'
)
else:
embed.add_field(
name='Baserunners', value='None', inline=False
)
# If an AI team is playing
if True in [game_state['pitcher']['team']['is_ai'], game_state['batter']['team']['is_ai']]: