TwitterFlightBot
(ARCHIVED) A Twitter bot that tells you information about a flight by it's number or callsign.
Install / Use
/learn @plcnk/TwitterFlightBotREADME
(ARCHIVED) Twitter Flight Bot
This bot will return information about a flight when you tag it with its flight number or its callsign.
To use it, you need to tag it by its Twitter handle @FlightStatusBot and follow with a flight number / callsign like so: .@FlightStatusBot U2189.
The bot will reply to you with the following information:
- The airline name with the flight number / callsign
- The origin airport name
- The actual departure time in UTC timezone
- The arrival airport name
- The Estimated Time of Arrival in UTC timezone
- The altitude in feet
Note - Be aware that the flight must be active for the bot to work, meaning the plane's transponder must be on.
The code is written in Python and uses Tweepy for the Twitter connection and FlightRadarAPI for the Flghtradar24 API. This bot is not affiliated with Flightradar24 in any way.
Setup
To run the code yourself, you will need to create an App on the Twitter Developer Portal and generated your tokens to be able to use the API.
After that, there are multiple methods to run this bot.
First method: Use the Docker image (recommended)
A Docker image is available for this project, which makes it easier for production environment and is the method I would recommend. You will first need to have Docker and Docker Compose installed on your machine for this to work.
First, cd into this repository:
cd ./TwitterFlightBot
Then, edit the docker-compose.yml file with your Twitter API credentials:
environment:
TWITTER_API_KEY: "XXXXX"
TWITTER_API_KEY_SECRET: "XXXXX"
TWITTER_ACCESS_TOKEN: "XXXXX"
TWITTER_ACCESS_TOKEN_SECRET: "XXXXX"
TWITTER_BEARER_TOKEN: "XXXXX"
Finally, start the bot using this command:
docker compose up -d
If you want to stop the bot, use this command:
docker compose down
Second method: Directly run the code
You can directly run the code on your machine or your VM. You will need to have Python3 installed, which comes by default on most Linux distros.
If you don't have it, install pip:
sudo apt install python3-pip
First, cd into this repository:
cd ./TwitterFlightBot
I recommend using a virtual environment to run the code, you can find out how to use this here. It is not required, but I highly recommend virtualenvs to avoid breaking your main environment.
After that, install the required packages with this command:
pip install -r requirements.txt
Next, you will need to export your Twitter API credentials as environment variables:
export TWITTER_API_KEY="XXXXX"
export TWITTER_API_KEY_SECRET="XXXXX"
export TWITTER_ACCESS_TOKEN="XXXXX"
export TWITTER_ACCESS_TOKEN_SECRET="XXXXX"
export TWITTER_BEARER_TOKEN="XXXXX"
Finally, start the bot with python main.py.
License
This project is licensed under MIT License. See LICENSE for more details.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
109.8kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
349.9kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
