1.7 KiB
DeletedPosts Bot
Description
DeletedPosts Bot monitors a specified subreddit for deleted posts and notifies moderators via modmail. It is designed to run continuously and can be easily deployed using Docker. Configuration is handled via environment variables or a Python config file.
Quick Install (Docker)
-
Clone this repository:
git clone https://github.com/yourusername/DeletedPosts.git cd DeletedPosts -
Copy
example.envto.envand fill in your Reddit API credentials and bot settings:CLIENT_ID=your_client_id_here CLIENT_SECRET=your_client_secret_here USER_AGENT="DeletedPostsBot/1.0 by YourUsername" USERNAME=bot_username PASSWORD=bot_password SUB_NAME=example_subreddit MAX_DAYS=180 MAX_POSTS=180 SLEEP_MINUTES=5 -
Use the provided
docker-compose.ymlfile:docker-compose up -d
The bot will automatically generate its configuration from your environment variables each time the container starts.
Advanced Install
If you want to customize the Docker setup or run the bot outside Docker:
-
Build your own Docker image:
git clone https://github.com/yourusername/DeletedPosts.git cd DeletedPosts docker build -t deletedposts . -
Create an
.envfile (or useexample.env) with your Reddit API credentials and bot settings. -
Run the container manually:
docker run --env-file .env deletedposts
Or run the bot directly on your host:
python Bot/main.py
You can reset the configuration back to the default template by invoking
reset_config on the command line:
python -m Bot.main reset_config
Other command line actions (help and reset_db) remain unchanged.