This is a Telegram bot that uses the FlightRadar24 API to track flights in a given area and notify users when a new flight appears in their area of interest. You can use this bot by adding @flights_24_bot to your Telegram chat or host it yourself.
- Set your location by sending your current location via Telegram and the bot will set your radius of interest to 5km by default
- The bot will scan for new flights within the given radius every 5 seconds and notify you if a new flight appears in your area of interest
- You can view information about each flight such as aircraft type, altitude, speed, origin airport, and destination airport
- You can view a map of your location with the size of the radius of interest
- Python 3+
- Telegram API key
- MySQL database
- Set up environment variables in your .env file for Telegram API key and MySQL credentials in .env file (see example.env for reference)
You can run the bot using Docker. The Dockerfile is set up to use the environment variables in the .env file.
- Build the image:
docker build -t flight-radar-bot .
- Run the container:
docker run -d --name flight-radar-bot flight-radar-bot
You can also run the bot using Docker Compose. The Dockerfile is set up to use the environment variables in the .env file.
- Run
docker-compose up -d
- Install the necessary dependencies:
pip install -r requirements.txt
- Run
python main.py
to start the bot
/start
- Start the bot/stop
- Stop the bot/radius
- Set the radius of interest in kilometers/altitude
- Set the altitude bounds for aircraft detection/altmin
- Set the min altitude for aircraft detection/altmax
- Set the max altitude for aircraft detection/track
- Track aircraft by aircraft registration
Thanks to FlightRadar24 for providing the API and komoot for the static map library.