LaunchBot is a Reddit bot designed to respond to user comments with information about upcoming rocket launches. It utilizes the Reddit API, along with data from TheSpaceDev's Launch Library 2 API, to provide users with details about Rocket Lab's next rocket launch.
It is currently operational under the reddit username u/LaunchBot
- Customized Responses: Searches for the latest launch in a specific location, or for a specific rocket based on the user's comment
- Live Reddit Integration: Continually monitors specified subreddits for user comments containing queries about rocket launches.
- API Interaction: Retrieves data from TheSpaceDev's Launch Library 2 API
- Regex Pattern Matching: Identifies relevant phrases in user comments using regular expressions.
- Time Conversion: Displays launch window details in both NZT and UTC.
- Cloud Deployment: LaunchBot is currently operational and deployed to an AWS EC2 instance for 24/7 operations.
-
Clone the repository:
git clone https://github.com/yourusername/LaunchBot.git
2a. Install Dependencies
pip3 install -r requirements.txt
or
2b. Manually install Dependencies
pip3 install praw
python -m pip3 install requests
pip3 install pytz
python3 LaunchBot.py
Unit tests are provided to ensure the functionality and correctness of the bot. Run the tests using:
python -m unittest TestLaunchBot.py
Contributions are welcome! Feel free to submit issues or pull requests if you encounter any bugs or have suggestions for improvements. I made this as a fun project to develop my python skills, so I would appreciate any comments/feedback!