This bot automates the creation of weekly discussion threads for the r/GermanRap subreddit. It posts different types of threads on a rotating schedule, including international releases, music recommendations, collaboration opportunities, and subreddit feedback. It can be quite easily adapted to other subreddits and topics by changing the .env and the texts in "all_post_texts.py".
- Automated weekly post creation
- Rotating topics for each week of the month
- Linking to previous threads
- Error logging and Discord notifications
- Python 3.7+
- PRAW (Python Reddit API Wrapper)
- python-dotenv
- requests
-
Clone the repository: git clone https://github.com/your-username/germanrap-subreddit-bot.git cd germanrap-subreddit-bot
-
Install the required packages: pip install -r requirements.txt
-
Create a
.envfile in the project root with the following variables:
CLIENT_ID=your_reddit_client_id
CLIENT_SECRET=your_reddit_client_secret
REFRESH_TOKEN=your_reddit_refresh_token
USER_AGENT=your_user_agent
SUBREDDIT=your_subreddit
FLAIRID=your_flair_id
WEBHOOK_URL=your_discord_webhook_url
Replace the placeholder values with your actual Reddit API credentials, data and Discord webhook URL.
To run the bot, execute the main script: python main.py The bot will automatically determine which weekly thread to post based on the current week of the month.
main.py: The entry point of the applicationWeekly_und_Collabo_Bot_Germanrap.py: Contains the main logic for creating and submitting postsalle_post_texte.py: Stores the text content for different types of postsconnect_to_reddit.py: Handles the Reddit API connectioncsv_handler.py: Manages the CSV file for tracking previous threads
The bot logs its activities to various log files:
main_script.logposterscript.logschedulerscript.log
Check these files for debugging information and error messages.
It's a personal hobby project but contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.
For any queries or issues, please open an issue on this GitHub repository.