Updates pending full V1 release

This commit is contained in:
2026-03-10 18:37:11 +00:00
parent 3e5a330929
commit 9719a9b5f9
7 changed files with 230 additions and 75 deletions
+28 -12
View File
@@ -1,13 +1,15 @@
# ModReplyBot Reddit Bot
ModReplyBot is a Reddit bot for moderators that watches for mod comments containing triggers, approves posts, and leaves stickied comments. It also posts automatic comments based on post tags, and notifies mods when its configuration changes. All configuration is handled via a subreddit wiki page and environment variables.
# ModReplyBot
ModReplyBot is a Reddit bot for moderators that automates post approval and stickied comments based on subreddit wiki configuration. It responds to mod comments and mod reports containing trigger phrases, and auto-comments on posts with configured tags. All configuration is managed via a subreddit wiki page and environment variables.
## Features
- Responds only to moderator comments containing triggers (ignores non-mod comments)
- Responds to moderator comments containing trigger phrases (starting with `!`)
- Responds to moderator reports containing trigger phrases (starting with `!`)
- Approves posts and leaves stickied comments
- Posts automatic comments based on tags in post titles (e.g., [Bedrock], [Java])
- Posts automatic comments based on tags in post titles (e.g., `[Bedrock]`, `[Java]`)
- Triggers, tag comments, and bot config are managed via a subreddit wiki page
- Notifies mods via modmail when the config wiki page changes
- Notifies mods via modmail when the config wiki page changes or is invalid
- Persistent database for auto-commented posts (survives restarts and container recreations)
- Docker and baremetal support
@@ -22,23 +24,27 @@ triggers:
comment: |
Thank you for your report!
This post is now approved.
- trigger: question
status: enabled
- trigger: wc
comment: |
This post has been approved.
Your question will be answered soon.
Welcome to the community!
status: log-only
post_tags:
- tag: Bedrock, Java
comment: |
__[Click here if your post says "Sorry, this post was removed by Reddits filters"](...)__
status: enabled
```
- Triggers: Bot responds to mod comments containing !trigger (e.g., !help) with the configured comment.
- Triggers: Bot responds to mod comments and mod reports containing `!trigger` (e.g., `!help`) with the configured comment.
- post_tags: Bot posts the comment automatically on new posts with matching tags in the title.
- Status options: `enabled`, `log-only`, `disabled`.
### 2. Environment Variables
Create a `.env` file (or set env variables directly) with:
```
REDDIT_CLIENT_ID=your_client_id
REDDIT_CLIENT_SECRET=your_client_secret
@@ -46,9 +52,14 @@ REDDIT_USERNAME=your_username
REDDIT_PASSWORD=your_password
REDDIT_USER_AGENT=modreplybot by /u/your_username
REDDIT_SUBREDDIT=your_subreddit
REDDIT_WIKI_PAGE=modbot-config
REDDIT_WIKI_PAGE=modreplybot-config
LOG_LEVEL=Default
```
docker compose up -d
docker run --env-file .env -v $(pwd)/DB:/app/DB slfhstd.uk/slfhstd/modreplybot:latest
pip install -r requirements.txt
## Installation
### Docker Compose (Recommended)
@@ -59,7 +70,7 @@ REDDIT_WIKI_PAGE=modbot-config
docker compose up -d
```
- The DB folder is mounted for persistent database storage.
* The DB folder is mounted for persistent database storage.
### Docker Run
1. Copy `.env.example` to `.env` and fill in your values.
@@ -84,12 +95,17 @@ pip install -r requirements.txt
python modreplybot.py
```
## Troubleshooting
- Ensure your Reddit credentials are correct and have moderator permissions.
- The bot must be able to read the wiki page and approve posts.
- Check logs for errors.
- The bot only responds to mod comments for triggers.
- The bot only responds to mod comments and mod reports for triggers.
- Database is stored in DB/commented_posts.txt and survives container restarts.
- If the wiki config is invalid, the bot will notify mods via modmail and pause until fixed.
## Moderator Guide
See `ModGuide.md` for a detailed guide to configuring triggers, auto-post tags, and wiki options.
## License
MIT