From cf4157a59d0178e1fd58019b22ba9039b04d9336 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Sun, 9 Mar 2025 00:58:15 -0600 Subject: [PATCH] Increase scorebug timeout to 8 seconds --- cogs/gameplay.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cogs/gameplay.py b/cogs/gameplay.py index 1ecbbbc..ae27d7f 100644 --- a/cogs/gameplay.py +++ b/cogs/gameplay.py @@ -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)