From 6239f1177c7e346b9959d9cfe94cfe8872d28c3a Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Wed, 25 Mar 2026 18:57:32 -0500 Subject: [PATCH] fix: context-aware empty state messages for /refractor status When filters are active and return 0 results, show which filters were applied and suggest removing them, instead of the misleading "No refractor data found for your team." Co-Authored-By: Claude Opus 4.6 (1M context) --- cogs/refractor.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cogs/refractor.py b/cogs/refractor.py index 28bd55a..18cfbaa 100644 --- a/cogs/refractor.py +++ b/cogs/refractor.py @@ -301,9 +301,18 @@ class Refractor(commands.Cog): page, ) if not items: - if progress == "close": + has_filters = card_type or tier is not None or progress + if has_filters: + parts = [] + if card_type: + parts.append(f"**{card_type.name}**") + if tier is not None: + parts.append(f"**{tier.name}**") + if progress: + parts.append(f"progress: **{progress.name}**") + filter_str = ", ".join(parts) await interaction.edit_original_response( - content="No cards are currently close to a tier advancement." + content=f"No cards match your filters ({filter_str}). Try `/refractor status` with no filters to see all cards." ) else: await interaction.edit_original_response(