CLAUDE: Fix draft command argument order and field name bugs
Two critical bugs in draft picks command: 1. Swapped arguments to get_team_by_owner(): - Was passing (season, owner_id) - Should be (owner_id, season) - This caused "Not a GM" error for all users 2. Using old field name ping_channel_id: - Model was updated to use ping_channel - Draft card posting still used old field name Fixes: - commands/draft/picks.py:136-139: Corrected argument order - commands/draft/picks.py:258-261: Updated to use ping_channel This resolves the "Not a GM" error when running /draft command. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7370fa7006
commit
43d166e417
@ -134,8 +134,8 @@ class DraftPicksCog(commands.Cog):
|
|||||||
|
|
||||||
# Get user's team (CACHED via @cached_single_item)
|
# Get user's team (CACHED via @cached_single_item)
|
||||||
team = await team_service.get_team_by_owner(
|
team = await team_service.get_team_by_owner(
|
||||||
config.sba_current_season,
|
interaction.user.id,
|
||||||
interaction.user.id
|
config.sba_current_season
|
||||||
)
|
)
|
||||||
|
|
||||||
if not team:
|
if not team:
|
||||||
@ -255,10 +255,10 @@ class DraftPicksCog(commands.Cog):
|
|||||||
await interaction.followup.send(embed=success_embed)
|
await interaction.followup.send(embed=success_embed)
|
||||||
|
|
||||||
# Post draft card to ping channel
|
# Post draft card to ping channel
|
||||||
if draft_data.ping_channel_id:
|
if draft_data.ping_channel:
|
||||||
guild = interaction.guild
|
guild = interaction.guild
|
||||||
if guild:
|
if guild:
|
||||||
ping_channel = guild.get_channel(draft_data.ping_channel_id)
|
ping_channel = guild.get_channel(draft_data.ping_channel)
|
||||||
if ping_channel:
|
if ping_channel:
|
||||||
draft_card = await create_player_draft_card(player_obj, current_pick)
|
draft_card = await create_player_draft_card(player_obj, current_pick)
|
||||||
await ping_channel.send(embed=draft_card)
|
await ping_channel.send(embed=draft_card)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user