Added discord bot object to complete game function

This commit is contained in:
Cal Corum 2025-06-01 09:44:16 -05:00
parent b3fa68b80e
commit a4adf50ca1
2 changed files with 3 additions and 3 deletions

View File

@ -160,7 +160,7 @@ class Gameplay(commands.Cog):
if submit_game:
logger.info(f'post_play - is_game_over - {interaction.user.display_name} rejected game completion')
await complete_game(session, interaction, this_play)
await complete_game(session, interaction, this_play, self.bot)
return
else:
logger.warning(f'post_play - is_game_over - {interaction.user.display_name} rejected game completion in Game {this_play.game.id}')

View File

@ -3353,7 +3353,7 @@ async def get_game_summary_embed(session: Session, interaction: discord.Interact
return game_embed
async def complete_game(session: Session, interaction: discord.Interaction, this_play: Play):
async def complete_game(session: Session, interaction: discord.Interaction, this_play: Play, bot: discord.Client = None):
# if interaction is not None:
# salutation = await interaction.channel.send('GGs, I\'ll tally this game up...')
# Add button with {winning_team} wins! and another with "Roll Back"
@ -3432,7 +3432,7 @@ async def complete_game(session: Session, interaction: discord.Interaction, this
run_id=int(this_game.game_type.split('-')[3]),
is_win=winning_team.gmid == interaction.user.id,
this_team=this_game.human_team,
bot=None,
bot=bot,
channel=interaction.channel,
responders=[interaction.user]
)