diff --git a/cogs/economy.py b/cogs/economy.py index ebb4058..3baecf4 100644 --- a/cogs/economy.py +++ b/cogs/economy.py @@ -1,3 +1,4 @@ +# ruff: noqa: F403, F405 import copy import helpers @@ -695,6 +696,9 @@ class Economy(commands.Cog): ) return + # Pack types that are auto-opened and should not appear in the manual open menu + AUTO_OPEN_TYPES = {"Check-In Player"} + # Group packs by type and customization (e.g. Standard, Standard-Orioles, Standard-2012, Premium) p_count = 0 p_data = { @@ -711,6 +715,11 @@ class Economy(commands.Cog): p_group = None logger.debug(f"pack: {pack}") logger.debug(f"pack cardset: {pack['pack_cardset']}") + if pack["pack_type"]["name"] in AUTO_OPEN_TYPES: + logger.debug( + f"Skipping auto-open pack type: {pack['pack_type']['name']}" + ) + continue if pack["pack_team"] is None and pack["pack_cardset"] is None: p_group = pack["pack_type"]["name"] # Add to p_data if this is a new pack type @@ -773,6 +782,9 @@ class Economy(commands.Cog): pretty_name = f"{key.split('-')[0]} - {key.split('-')[3]}" elif "Cardset" in key: pretty_name = f"{key.split('-')[0]} - {key.split('-')[3]}" + else: + # Pack type name contains a hyphen (e.g. "Check-In Player") + pretty_name = key if pretty_name is not None: embed.add_field(name=pretty_name, value=f"Qty: {len(p_data[key])}")