Commit Graph

3 Commits

Author SHA1 Message Date
Marco Gallegos
d26275626c Merge pull request #1 from marcogll/jules-fix-registration-state-14179576736746316709
Implement File-Based Persistence for User Registration
2025-12-23 08:53:05 -06:00
google-labs-jules[bot]
cfe6d96113 feat: Implement file-based persistence for user registration
This commit introduces a file-based persistence layer to store and retrieve registered user chat IDs.

Previously, the bot used an in-memory `set` to track registered users, which was cleared on every restart. This caused the bot to lose track of all registered users, preventing them from accessing registered-only features.

This commit resolves the issue by:
- Creating a `data/registered_users.txt` file to store user chat IDs.
- Implementing a `load_registered_users` function to load the user data from the file at startup.
- Modifying the `register_user` function to append new user chat IDs to the file.
- Calling `load_registered_users` from `main.py` at startup to initialize the user state.
2025-12-23 05:15:39 +00:00
Marco Gallegos
36b7154c6e first commit 2025-12-22 22:47:33 -06:00