Implement paperdex dupe-detection logic #23
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#23
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
helpers/main.py:180andhelpers.py:180have# TODO: check for dupes with the included paperdex data. The Dupes embed field is commented out and replacement shows 0 data. Players cannot see their dupe count.PR #70 opened: #70
Implemented dupe detection in
get_card_embeds()in bothhelpers/main.pyandhelpers.py. Callsdb_get('cards', params=[player_id, team_id])to count copies owned, then displays# Dupesfield (e.g. "0 dupes", "1 dupe", "3 dupes"). The paperdex data already fetched is a "has collected" tracker (one row per player-team pair) so a separate cards API call is needed for copy count.Fixed in PR #107 (
fix/checkin-and-paperdex-fixes).The commented-out TODO block in
get_card_embeds()(helpers/main.py) has been replaced with working dupe-detection logic. It queriesdb_get('cards', ...)filtered byplayer_idandteam_id, then adds a "Dupes" field to the embed (e.g. "0 dupes", "1 dupe", "2 dupes"). The field is only added for non-Paper-Dynasty teams, matching the existing "Collected By" guard.