diff --git a/discord_ui/selectors.py b/discord_ui/selectors.py index 1db2810..5dcfbe3 100644 --- a/discord_ui/selectors.py +++ b/discord_ui/selectors.py @@ -174,7 +174,15 @@ class SelectOpenPack(discord.ui.Select): await interaction.response.edit_message(view=None) cardset_id = None - if 'Team Choice' in pack_vals and 'Cardset' in pack_vals: + # Handle Team Choice packs with no team/cardset assigned + if 'Team Choice' in pack_vals and 'Team' not in pack_vals and 'Cardset' not in pack_vals: + await interaction.followup.send( + content='This Team Choice pack needs to be assigned a team and cardset. ' + 'Please contact an admin to configure this pack.', + ephemeral=True + ) + return + elif 'Team Choice' in pack_vals and 'Cardset' in pack_vals: # cardset_id = pack_vals[2] cardset_index = pack_vals.index('Cardset') cardset_id = pack_vals[cardset_index + 1]