feat: Scouting feature (Wonder Pick-style social pack opening) #50
No reviewers
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
ai-working
bug
enhancement
feature
in-queue
performance
security
tech-debt
todo
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-discord#50
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/scouting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
<t:UNIX:R>instead of a static "30 minutes" message.SCOUT_TOKENS_PER_DAY,get_scout_tokens_used(), andmidnight_timestamp()centralized to eliminate duplication across 3 files.New files
discord_ui/scout_view.py— ScoutView + ScoutButton UIhelpers/scouting.py— embed builders, scout opportunity creation, shared constantscogs/economy_new/scouting.py—/scout-tokenscommand and cleanup tasktests/scouting/— full test suite (conftest, helpers, view, cog)Modified files
helpers/main.py— Hook intoopen_st_pr_packs()afterdisplay_cards()helpers/utils.py— Addedmidnight_timestamp()paperdynasty.py— Register scouting cogdiscord_ui/__init__.py— Avoid circular import with ScoutViewRequires new API endpoints in paper-dynasty-database (
scout_opportunities,scout_claims). Tracks #44.Test plan
/scout-tokens→ shows correct remaining countpython -m pytest tests/scouting/→ 66 tests pass🤖 Generated with Claude Code
- Fix int_timestamp() no-arg path returning seconds instead of milliseconds, which would silently break the daily scout token cap against the real API - Acknowledge double-click interactions with ephemeral message instead of silently returning (Discord requires all interactions to be acked) - Reorder scout flow: create card copy before consuming token so a failure doesn't cost the player a token for nothing - Move build_scouted_card_list import to top of scout_view.py - Remove unused asyncio import from helpers/scouting.py - Fix footer text inconsistency ("One scout per player" everywhere) - Update tests for new operation order and double-click behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>c39d8d173btod569e91905