mirror of
https://github.com/marcogll/vanessa_bot_vanity.git
synced 2026-01-13 13:25:16 +00:00
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.
5.4 KiB
5.4 KiB