Fix /draft command to post player cards to result channel

The manual /draft command was only posting draft cards to the ping_channel,
but not to the result_channel. The auto-draft task correctly posted to both
channels. This fix ensures manual draft picks also post player cards to the
configured result channel for consistent draft result tracking.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2025-12-12 19:08:23 -06:00
parent 08fbd0a812
commit 95d18d603e
2 changed files with 19 additions and 1 deletions

View File

@ -1 +1 @@
2.24.4 2.24.5

View File

@ -358,6 +358,24 @@ class DraftPicksCog(commands.Cog):
await ping_channel.send(embed=draft_card) await ping_channel.send(embed=draft_card)
# Post draft card to result channel (separate from ping channel)
if draft_data.result_channel:
guild = interaction.guild
if guild:
result_channel = guild.get_channel(draft_data.result_channel)
if result_channel:
result_card = await create_player_draft_card(player_obj, pick_to_use)
# Add skipped pick context to result card
if is_skipped_pick:
result_card.set_footer(
text=f"📝 Making up skipped pick (current pick is #{current_pick.overall})"
)
await result_channel.send(embed=result_card)
else:
self.logger.warning(f"Could not find result channel {draft_data.result_channel}")
# Only advance the draft if this was the current pick (not a skipped pick) # Only advance the draft if this was the current pick (not a skipped pick)
if not is_skipped_pick: if not is_skipped_pick:
await draft_service.advance_pick(draft_data.id, draft_data.currentpick) await draft_service.advance_pick(draft_data.id, draft_data.currentpick)