2026-03-08 18:16:19 +00:00
2026-03-08 18:16:19 +00:00
2026-03-08 18:16:19 +00:00
2026-03-08 18:08:24 +00:00
2026-03-08 18:16:19 +00:00
2026-03-08 18:08:24 +00:00
2026-03-08 18:16:19 +00:00
2026-03-08 18:16:19 +00:00
2026-03-08 18:08:24 +00:00

ModReplyBot Reddit Bot

This bot watches a subreddit for moderator reports containing triggers, approves posts, and leaves stickied comments. Triggers and comments are configured via a subreddit wiki page. All other settings are handled via environment variables.

Features

  • Watches for moderator reports with triggers
  • Approves posts and leaves stickied comments
  • Triggers/comments configured via subreddit wiki
  • Supports multiple triggers/comments
  • Docker and baremetal support

Configuration

1. Subreddit Wiki Page

Create a wiki page (e.g. modreplybot-config) in your subreddit using Automoderator YAML format. Example:

triggers:
  - trigger: help
    comment: |
      Thank you for your report!
      This post is now approved.

  - trigger: question
    comment: |
      This post has been approved.
      Your question will be answered soon.

Each entry under triggers defines a trigger and its associated multi-line comment.

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
REDDIT_USERNAME=your_username
REDDIT_PASSWORD=your_password
REDDIT_USER_AGENT=modreplybot by /u/your_username
REDDIT_SUBREDDIT=your_subreddit
REDDIT_WIKI_PAGE=modreplybot-config

Installation

  1. Copy .env.example to .env and fill in your values.
  2. Run:
docker compose up -d

Docker Run

  1. Copy .env.example to .env and fill in your values.
  2. Run:
docker run --env-file .env slfhstd.uk/slfhstd/modreplybot:latest

Baremetal (Direct Python)

  1. Install Python 3.11+
  2. Install dependencies:
pip install -r requirements.txt
  1. Set environment variables or create a .env file.
  2. Run:
python modbot.py

Building the Docker Image

If you want to build your own image:

docker build -t modreplybot .

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.

License

MIT

S
Description
No description provided
Readme 150 KiB
V2.2.3 Latest
2026-04-04 15:54:49 +01:00
Languages
Python 99.3%
Dockerfile 0.7%