Skip to content

fix(stats): store players who join a group game via the join button - #117

Merged
d-Rickyy-b merged 1 commit into
masterfrom
claude/project-thread-gbpez2-join-stats
Oct 8, 2026
Merged

d-Rickyy-b merged 1 commit into
masterfrom
claude/project-thread-gbpez2-join-stats

Conversation

@d-Rickyy-b

Copy link
Copy Markdown
Owner

Requested by Rico · project thread

Before: a player who joined a group game with the Join button, and had never sent /start to the bot, got no statistics. Their games weren't counted, and /stats replied "No statistics found!".

After: joining a game through the button stores the player in the database, so their played and won games are tracked like everyone else's.

How: only start_cmd called Database().add_user. join_callback now calls it too, right after the player has been added to the game. add_user is a no-op for users who are already stored. A new test, commands_test.py, checks that join_callback stores the joining user.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KouGQtM6VBedfBdNr8WFX5


Generated by Claude Code

@d-Rickyy-b d-Rickyy-b self-assigned this Oct 8, 2026
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 68.68% (+1.3%) from 67.395% — claude/project-thread-gbpez2-join-stats into master

@coveralls

coveralls commented Oct 8, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 70.383% (+1.0%) from 69.363% — claude/project-thread-gbpez2-join-stats into master

Only /start added users to the database. Players who joined a group game
with the join button had no users row, so their played and won games
were never recorded and /stats showed "No statistics found!".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KouGQtM6VBedfBdNr8WFX5
@d-Rickyy-b
d-Rickyy-b force-pushed the claude/project-thread-gbpez2-join-stats branch from 79614da to f8a12d2 Compare October 8, 2026 21:34
@d-Rickyy-b
d-Rickyy-b merged commit e10272e into master Oct 8, 2026
4 checks passed
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.

3 participants