diff --git a/cogs/gameplay.py b/cogs/gameplay.py index 9b19087..b8805c1 100644 --- a/cogs/gameplay.py +++ b/cogs/gameplay.py @@ -348,6 +348,8 @@ class Gameplay(commands.Cog): with Session(engine) as session: this_game, owner_team, this_play = await checks_log_interaction(session, interaction, command_name='flyball') + await interaction.edit_original_response(content=f'Pow goes teh fly ball!') + async def setup(bot): await bot.add_cog(Gameplay(bot)) \ No newline at end of file diff --git a/command_logic/logic_gameplay.py b/command_logic/logic_gameplay.py index ca40d0a..6bfaf4c 100644 --- a/command_logic/logic_gameplay.py +++ b/command_logic/logic_gameplay.py @@ -87,6 +87,7 @@ async def get_lineups_from_sheets(session: Session, sheets, this_game: Game, thi async def checks_log_interaction(session: Session, interaction: discord.Interaction, command_name: str) -> tuple[Game, Team, Play]: + await interaction.response.defer(thinking=True) this_game = get_channel_game_or_none(session, interaction.channel_id) if this_game is None: raise GameNotFoundException('I don\'t see an active game in this channel.') @@ -103,7 +104,7 @@ async def checks_log_interaction(session: Session, interaction: discord.Interact logging.exception(f'{command_name} command: No gauntlet team found with abbrev {gauntlet_abbrev}') raise TeamNotFoundException(f'Hm, I was not able to find a gauntlet team for you.') - if not owner_team['id'] in [this_game.away_team_id, this_game.home_team_id]: + if not owner_team.id in [this_game.away_team_id, this_game.home_team_id]: logging.exception(f'{interaction.user.display_name} tried to run a command in Game {this_game.id} when they aren\'t a GM in the game.') raise TeamNotFoundException('Bruh. Only GMs of the active teams can log plays.')