This project is a Telegram bot for managing bike reservations. Users can create, view, and cancel reservations through the bot. The bot interacts with CSV files to store data about users, bikes, and reservations.
- Create new bike reservations
- View existing reservations
- Cancel reservations
- Manage user information
- Manage bike information
src/main.py: Contains the main logic for the Telegram bot.src/storage.py: Contains classes for managing storage of users, bikes, and reservations in CSV files.storage/: Directory containing the CSV files used for storing data.tests/: Directory for unit tests.
-
Clone the repository:
git clone https://github.com/yourusername/bike-reservation-bot.git cd bike-reservation-bot -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up your Telegram bot token:
- Create a
.envfile in the root directory of the project. - Add your bot token to the
.envfile:BOT_TOKEN=your-telegram-bot-token
- Create a
-
Run the bot:
python main.py
-
Interact with the bot on Telegram using the commands:
/start: Start the bot and receive a welcome message./help: Get help information about the bot./res: Manage or create your reservations.
The bot uses CSV files to store data:
storage/bikes.csv: Stores information about bikes.storage/reservations.csv: Stores information about reservations.storage/users.csv: Stores information about users.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.