Repository navigation
fix(stats): store players who join a group game via the join button - #117
Merged
Merged
Conversation
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
force-pushed
the
claude/project-thread-gbpez2-join-stats
branch
from
October 8, 2026 21:34
79614da to
f8a12d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Rico · project thread
Before: a player who joined a group game with the Join button, and had never sent
/startto the bot, got no statistics. Their games weren't counted, and/statsreplied "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_cmdcalledDatabase().add_user.join_callbacknow calls it too, right after the player has been added to the game.add_useris a no-op for users who are already stored. A new test,commands_test.py, checks thatjoin_callbackstores the joining user.🤖 Generated with Claude Code
https://claude.ai/code/session_01KouGQtM6VBedfBdNr8WFX5
Generated by Claude Code