Skip to content

feat: /achievement, /recipe and /compare look up achievements, recipes with their guild crafters, and two characters side by side - #5

Merged
JacobCoffee merged 3 commits into
mainfrom
feat/lookup-commands
Nov 11, 2026
Merged

JacobCoffee merged 3 commits into
mainfrom
feat/lookup-commands

Conversation

@JacobCoffee

Copy link
Copy Markdown
Contributor

Summary

  • /achievement <name> looks up a WoW: Forever achievement (points, description, category, icon, site link). No name-search route exists on the site, so the cog flattens the category tree into a module-cached catalog (1h TTL, matching the site's own edge cache) and offers autocomplete + a select menu for other matches, mirroring /item's pattern.
  • /recipe <name> shows a recipe's profession, crafted item, reagents and guild crafters, reusing /crafter's bot-key crafters route to find the matching recipe's Battle.net id (no recipe name-search route exists either), then fetches full detail from GET /api/recipes/{id}. Falls back to a crafters-only view if Battle.net was unreachable when the guild's crafter data last synced.
  • /compare <character1> <character2> is /who for two characters side by side: level/class/PvP per side, item level with the lead highlighted, and a per-slot gear comparison table in a code block. Reuses /who's autocomplete and slug parsing; both get_character calls run concurrently.
  • Mirrors AchievementSchema/AchievementCategoryTree/AchievementCategorySchema/RecipeDetail etc. directly from the pinned sidequest-common commit (these schemas are already in the pin, confirmed identical to the website's current HEAD), plus three new api_client.py methods for achievements and one for recipes.
  • 404 → friendly ephemeral reply, 503 → retry message, same as the existing commands.

Testing

  • make ci (ruff format/lint, pyrefly, pytest): all green, 1162 tests passed.
  • Smoke-tested the new api_client methods against the real public site (https://sidequest-guild.com):
    • /api/achievements/{id} → built build_achievement_embed → rendered via embed.to_dict().
    • /api/recipes/{id} → built build_recipe_embed (showed a real guild crafter, "Nox Zul — skill 119").
    • /api/characters/{slug} for a roster pair → built build_compare_embed (real item-level/gear diff table).

Docs

  • Updated README's "Commands for everyone" section with the three new commands.

@JacobCoffee JacobCoffee changed the title Add /achievement, /recipe, and /compare lookup commands feat: /achievement, /recipe and /compare look up achievements, recipes with their guild crafters, and two characters side by side Nov 11, 2026
@JacobCoffee
JacobCoffee merged commit 83bd304 into main Nov 11, 2026
7 checks passed
@JacobCoffee
JacobCoffee deleted the feat/lookup-commands branch November 11, 2026 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant