This commit introduces a `/reset` command that allows users to clear their registration status. This is useful for testing the registration conversation flow multiple times without needing to restart the bot.
The command works by removing the user's chat ID from the in-memory set of registered users and then displaying the main menu again.
This reverts the changes that introduced file-based persistence for user registration.
The user has requested that the bot should not persist user registrations to allow for repeated testing of the registration flow. This commit restores the original in-memory registration behavior, where the list of registered users is cleared on every restart.
This change facilitates testing by allowing the same user to go through the registration process multiple times without being remembered by the bot.
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.