diff --git a/cogs/economy.py b/cogs/economy.py index 3032622..1680fee 100644 --- a/cogs/economy.py +++ b/cogs/economy.py @@ -593,6 +593,8 @@ class Economy(commands.Cog): p_group = f'Team Choice-Cardset-{pack["pack_cardset"]["id"]}-{pack["pack_cardset"]["name"]}' elif pack['pack_type']['name'] == 'All Star': p_group = f'All Star-Cardset-{pack["pack_cardset"]["id"]}-{pack["pack_cardset"]["name"]}' + elif pack['pack_type']['name'] == 'All Star': + p_group = f'MVP-Cardset-{pack["pack_cardset"]["id"]}-{pack["pack_cardset"]["name"]}' logging.debug(f'p_group: {p_group}') if p_group is not None: diff --git a/cogs/players.py b/cogs/players.py index 8bed078..ce63026 100644 --- a/cogs/players.py +++ b/cogs/players.py @@ -555,7 +555,9 @@ class Players(commands.Cog): await interaction.edit_original_response(content=None, embed=embed) - @app_commands.command(name='card-lookup', description='Look up individual cards by ID') + group_lookup = app_commands.Group(name='lookup', description='Search for cards or players by ID') + + @group_lookup.command(name='card-id', description='Look up individual card by ID') @app_commands.checks.has_any_role(PD_PLAYERS_ROLE_NAME) async def card_lookup_command(self, interaction: discord.Interaction, card_id: int): await interaction.response.defer() @@ -574,8 +576,24 @@ class Players(commands.Cog): content=c_string, embeds=await get_card_embeds(c_query) ) - else: - await interaction.edit_original_response(content=f'No card found with id {card_id}') + return + + await interaction.edit_original_response(content=f'There is no card with ID {card_id}') + + @group_lookup.command(name='player-id', description='Look up an individual player by ID') + @app_commands.checks.has_any_role(PD_PLAYERS_ROLE_NAME) + async def player_lookup_command(self, interaction: discord.Interaction, player_id: int): + await interaction.response.defer() + p_query = await db_get('players', object_id=player_id) + if p_query: + p_card = get_blank_team_card(p_query) + await interaction.edit_original_response( + content=None, + embeds=await get_card_embeds(p_card) + ) + return + + await interaction.edit_original_response(content=f'There is no player with ID {player_id}.') @commands.hybrid_command(name='branding-pd', help='Update your team branding') @commands.has_any_role(PD_PLAYERS_ROLE_NAME)