From 647ae1ca1597512a02d10839e8e33bc8c73fff8f Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 11 Dec 2025 13:04:29 -0600 Subject: [PATCH] Post auto-draft picks to result channel with draft card embed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Auto-draft picks now post the same draft card embed to the result channel that regular /draft picks do, with a footer indicating the pick was auto-drafted from the draft list. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tasks/draft_monitor.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/tasks/draft_monitor.py b/tasks/draft_monitor.py index cb282c7..74d38a0 100644 --- a/tasks/draft_monitor.py +++ b/tasks/draft_monitor.py @@ -249,7 +249,9 @@ class DraftMonitorTask: success = await self._attempt_draft_player( current_pick, player, - ping_channel + ping_channel, + draft_data, + guild ) if success: @@ -285,7 +287,9 @@ class DraftMonitorTask: self, draft_pick, player, - ping_channel + ping_channel, + draft_data, + guild ) -> bool: """ Attempt to draft a specific player. @@ -294,6 +298,8 @@ class DraftMonitorTask: draft_pick: DraftPick to update player: Player to draft ping_channel: Discord channel for announcements + draft_data: Draft configuration (for result_channel) + guild: Discord guild (for channel lookup) Returns: True if draft succeeded @@ -343,12 +349,23 @@ class DraftMonitorTask: # Write pick to Google Sheets (fire-and-forget) await self._write_pick_to_sheets(draft_pick, player, ping_channel) - # Post to channel + # Post to ping channel await ping_channel.send( content=f"🤖 AUTO-DRAFT: {draft_pick.owner.abbrev} selects **{player.name}** " f"(Pick #{draft_pick.overall})" ) + # Post draft card to result channel (same as regular /draft picks) + if draft_data.result_channel: + result_channel = guild.get_channel(draft_data.result_channel) + if result_channel: + from views.draft_views import create_player_draft_card + draft_card = await create_player_draft_card(player, draft_pick) + draft_card.set_footer(text="🤖 Auto-drafted from draft list") + await result_channel.send(embed=draft_card) + else: + self.logger.warning(f"Could not find result channel {draft_data.result_channel}") + return True except Exception as e: