Files
vanessa_bot_vanity/app/modules/database.py
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

2.9 KiB