Implement paperdex dupe-detection logic #23

Closed
opened 2026-02-20 06:51:16 +00:00 by cal · 2 comments
Owner

helpers/main.py:180 and helpers.py:180 have # 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.

`helpers/main.py:180` and `helpers.py:180` have `# 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.
cal added the
enhancement
todo
labels 2026-02-20 06:51:16 +00:00
cal added the
ai-working
label 2026-03-05 21:31:25 +00:00
cal removed the
ai-working
label 2026-03-05 21:35:49 +00:00
Author
Owner

PR #70 opened: #70

Implemented dupe detection in get_card_embeds() in both helpers/main.py and helpers.py. Calls db_get('cards', params=[player_id, team_id]) to count copies owned, then displays # Dupes field (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.

PR #70 opened: https://git.manticorum.com/cal/paper-dynasty-discord/pulls/70 Implemented dupe detection in `get_card_embeds()` in both `helpers/main.py` and `helpers.py`. Calls `db_get('cards', params=[player_id, team_id])` to count copies owned, then displays `# Dupes` field (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.
cal added the
ai-pr-opened
label 2026-03-05 21:35:57 +00:00
Author
Owner

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 queries db_get('cards', ...) filtered by player_id and team_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.

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 queries `db_get('cards', ...)` filtered by `player_id` and `team_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.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-discord#23
No description provided.