CLAUDE: Fix Team Choice pack hanging by using interaction.followup.send()
When opening a Team Choice pack without a pre-assigned team, the bot would: 1. Edit the interaction to remove the pack selection view 2. Send team selection (AL/NL) via interaction.channel.send() 3. Return without sending a followup to the interaction 4. Discord left waiting for a response that never came Changed interaction.channel.send() to interaction.followup.send() with a helpful message explaining what's happening. This properly responds to the interaction and allows the team selection dropdown to function. The issue occurred at discord_ui/selectors.py:188 in SelectOpenPack callback. Fixes: /open-packs command hangs when selecting 'Team Choice' pack type 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
021573bc65
commit
81373a9b42
@ -67,7 +67,8 @@ CARDSET_LABELS_TO_IDS = {
|
|||||||
'2024 Season': 17,
|
'2024 Season': 17,
|
||||||
'2024 Promos': 18,
|
'2024 Promos': 18,
|
||||||
'1998 Season': 20,
|
'1998 Season': 20,
|
||||||
'2025 Live': 24,
|
'2025 Season': 24,
|
||||||
|
'2005 Live': 27,
|
||||||
'Pokemon - Brilliant Stars': 23
|
'Pokemon - Brilliant Stars': 23
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,8 +185,8 @@ class SelectOpenPack(discord.ui.Select):
|
|||||||
SelectChoicePackTeam('NL', self.owner_team, cardset_id)],
|
SelectChoicePackTeam('NL', self.owner_team, cardset_id)],
|
||||||
timeout=30
|
timeout=30
|
||||||
)
|
)
|
||||||
await interaction.channel.send(
|
await interaction.followup.send(
|
||||||
content=None,
|
content='Please select a team for your Team Choice pack:',
|
||||||
view=view
|
view=view
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
@ -213,7 +214,8 @@ class SelectOpenPack(discord.ui.Select):
|
|||||||
class SelectPaperdexCardset(discord.ui.Select):
|
class SelectPaperdexCardset(discord.ui.Select):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
options = [
|
options = [
|
||||||
discord.SelectOption(label='2025 Live'),
|
discord.SelectOption(label='2005 Live'),
|
||||||
|
discord.SelectOption(label='2025 Season'),
|
||||||
discord.SelectOption(label='1998 Season'),
|
discord.SelectOption(label='1998 Season'),
|
||||||
discord.SelectOption(label='2024 Season'),
|
discord.SelectOption(label='2024 Season'),
|
||||||
discord.SelectOption(label='2023 Season'),
|
discord.SelectOption(label='2023 Season'),
|
||||||
@ -282,7 +284,8 @@ class SelectPaperdexTeam(discord.ui.Select):
|
|||||||
class SelectBuyPacksCardset(discord.ui.Select):
|
class SelectBuyPacksCardset(discord.ui.Select):
|
||||||
def __init__(self, team: dict, quantity: int, pack_type_id: int, pack_embed: discord.Embed, cost: int):
|
def __init__(self, team: dict, quantity: int, pack_type_id: int, pack_embed: discord.Embed, cost: int):
|
||||||
options = [
|
options = [
|
||||||
discord.SelectOption(label='2025 Live'),
|
discord.SelectOption(label='2005 Live'),
|
||||||
|
discord.SelectOption(label='2025 Season'),
|
||||||
discord.SelectOption(label='1998 Season'),
|
discord.SelectOption(label='1998 Season'),
|
||||||
discord.SelectOption(label='Pokemon - Brilliant Stars'),
|
discord.SelectOption(label='Pokemon - Brilliant Stars'),
|
||||||
discord.SelectOption(label='2024 Season'),
|
discord.SelectOption(label='2024 Season'),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user