A Discord bot that provides real-time flight arrival and departure information for airports using their IATA code, powered by the AviationStack API.
- Responds to user greetings and prompts for an IATA airport code.
- Retrieves and displays flight information including status, times, and airline details.
- Saves flight data to local files
departure_data.json
andarrival_data.json
.
- A Discord Bot Token.
- An API key from AviationStack.
- Python 3.6+.
-
Clone the repository:
git clone https://github.com/DanteSc03/DiscordFlightBot.git
-
Install dependencies:
pip install -r requirements.txt
-
Add your Discord Bot Token and AviationStack API key in the script:
- Rename
.env.sample
to.env
and paste in your keys.
- Rename
-
Run the bot:
python bot.py
- Start the bot and greet it with hello in your Discord Server
- The bot will prompt for an IATA airport code (ex: LAX, JFK, etc...)
- Bot retrieves and displays flight information in the chat (data is also locally stored)
This project is under the MIT license. Feel free to fork the repo and make suggestions with pull requests. All suggestions are welcome.