preview.mp4
This is a Telegram bot built using aiogram 3 that helps users find their dream apartments. The bot allows users to browse available apartments, save their favorite ones, and schedule viewings. Managers have access to a database of all apartments, users, and saved apartments in Excel format.
- Apartment Browsing: Users can browse available apartments with details such as address, price, region, number of rooms, floor, metro station, and additional information.
- Saving Favorites: Users can save their favorite apartments and access them later.
- Viewing Scheduling: Users can schedule a viewing for any apartment.
- Manager Access: Managers can download the entire database in Excel format, which includes different sheets for apartments, users, and saved apartments.
- Python 3.8+
pip(Python package installer)- A Telegram bot token (from @BotFather)
-
Clone the repository:
git clone https://https://github.com/AdobyY/rieltor_bot cd rieltor-bot -
Create a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Set up the database:
Ensure you have SQLite installed. The database will be created automatically based on the models provided in the
models.pyfile. -
Configure environment variables:
Create a
.envfile in the root of the project and add your Telegram bot token:BOT_TOKEN=your_telegram_bot_token_here
-
Run the bot:
python main.py
- /start: Start interacting with the bot.
- /help: Get a list of available commands.
- /get_data: (Managers only) Download the database in Excel format.
- /updata_data: (Managers only) Updata the database if the External Excel file with all apartments has been changed.
