Increase scorebug timeout to 8 seconds

This commit is contained in:
Cal Corum 2025-03-09 00:58:15 -06:00
parent 8e35812cd3
commit cf4157a59d

View File

@ -175,7 +175,7 @@ class Gameplay(commands.Cog):
if this_play.game.roll_buttons and interaction.user.id in [this_play.game.away_team.gmid, this_play.game.home_team.gmid]:
logger.info(f'Including scorebug buttons')
scorebug_buttons = ScorebugButtons(this_play, scorebug_embed, timeout=5)
scorebug_buttons = ScorebugButtons(this_play, scorebug_embed, timeout=8)
if this_play.on_base_code == 0 and this_play.game.auto_roll and not this_play.batter.team.is_ai and not this_play.is_new_inning:
logger.info(f'Rolling ab')
@ -1142,6 +1142,11 @@ class Gameplay(commands.Cog):
this_game, owner_team, this_play = await checks_log_interaction(session, interaction, command_name='substitute batter')
if batting_order == 'this-spot':
if this_play.batter.team != owner_team:
logger.info(f'Batting order not included while on defense; returning')
await interaction.edit_original_response(content=f'When you make a defensive substitution, please include the batting order where they should enter.')
return
this_order = this_play.batting_order
else:
this_order = int(batting_order)