This Telegram bot allows users to conveniently find the cheapest flights and receive price alerts for their desired routes.
Try out the Flight Spotter Bot on Telegram.
We all love finding cheap flights, but it can often feel like a challenge. That’s where this Telegram Bot comes in!
Powered by the Kiwi flight API, this bot makes it easy to search for the best deals on flights for your chosen routes and dates. Once you find a flight, you can even save it for price tracking. The bot will notify you if the price drops, so you’ll never miss out on a great deal!
- Live Flight Search (Oneway,Return and Multi-City Flight Search).
- Support for User input validation.
- Flight Tracking.
- KIWI API Support.
- Inline And Keyboard Markup support.
- Admin Panel.
- Price Alerts.
/start
- Initializes Bot welcome response./flight_alerts
- Show all saved flight alerts./menu
- Navigate to Main Menu./reset
- Reset the flight search./help
- Show Help./admin
- Navigate to Admin Dashboard.
-
Get your Telegram Bot token from @BotFather.
-
Create an account on KIWI and get your flight search API KEY.
-
Configuration : edit the configuration by renaming the
.env.example file
and renaming it to.env
, then edit the required env variables.Env Variable Description Defaults BOT_TOKEN
Your Telegram Bot Token None KIWI_API_KEY_STD
Your KIWI API key for Oneway and Return flight search None KIWI_API_KEY_MULTICITY
Your KIWI API key for Multicity flight search None DATABASE_PATH
Your database file path database.db
ADMINISTRATOR
Holds a list of telegram chat id's for admin rights [Integer]
This bot is compatible only with a SQL database file. If you have an existing database from prior use, make sure to update the file path in your .env file. The default path is database/database.db, which will be automatically created upon the first call to the database instance.
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
# For Linux or macOS:
source venv/bin/activate
# For Windows:
venv\Scripts\activate
- Install the dependencies using
requirements.txt
file:
pip install -r requirements.txt
- Use the following command to start the bot:
python bot.py
-
Build Docker Image with Environment Variables:
Replace your-image-name:your-tag with your desired image and tag.
docker build --build-arg ENV_FILE=.env -t your-image-name:your-tag
-
Run Docker Container
docker run -d -p 8080:80 --env-file .env your-image-name:your-tag
This project is licensed under the MIT License - see the LICENSE file for details.