This bot automates the process of generating unique content for Reddit and posting it to a specified subreddit at a scheduled time using Groq AI and Reddit's API.
- Reddit API Authentication: Seamlessly integrates with Reddit's API for posting to subreddits.
- Automated Topic and Content Generation: Uses Groq AI to automatically generate relevant and engaging Reddit topics and content. No manual topic input needed.
- Model Used: The bot uses Groq AI's llama3-70b-8192 model to generate high-quality, creative content.
- Scheduled Posting: Set the bot to post content at a specific time each day.
- Logging and Error Handling: Basic logging tracks post status and logs errors for troubleshooting.
-
Automatic Idea Generation: The bot generates unique, creative topics, with no manual input. If a topic has been used before, it generates a new one.
-
Content Generation: Using the generated topic, the bot sends it to Groq's AI model to generate engaging and Reddit-optimized content.
-
Reddit Posting: The bot posts the generated content and title to the specified subreddit at the scheduled time, all fully automated.
-
Logging and Monitoring: The bot logs key activities like successful posts and errors, making it easy to track and resolve any issues.
-
Clone the repository
Clone the repository to your local machine using Git
-
Install dependencies
pip install -r requirements.txt
-
Create a .env file
In the root directory of the project, create a .env file and add the following :
REDDIT_CLIENT_ID=your_reddit_client_id
REDDIT_CLIENT_SECRET=your_reddit_client_secret
REDDIT_USERNAME=your_reddit_username
REDDIT_PASSWORD=your_reddit_password
REDDIT_USER_AGENT=bot
GROQ_API_KEY=your_groq_api_key -
Run the bot
Once the .env file is set up, run the bot with the following command :
python reddit_bot.py