fix: context-aware empty state messages for /refractor status
All checks were successful
Ruff Lint / lint (pull_request) Successful in 23s

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) <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2026-03-25 18:57:32 -05:00
parent dea6316201
commit 6239f1177c

View File

@ -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(