A specialized moderation bot for /r/Animewallpaper and possibly some other wallpaper subreddits I moderate.
- Mismatched Resolution Detection (ResolutionMismatch)
- Resolution Thresholds (ResolutionBad)
- Aspect Ratio Thresholds (AspectRatioBad)
- Source Comment Detection (SourceCommentAny)
- Rate Limiting (RateLimitAny)
- Repost Detection (RepostAny)
Complete and rename the file .env-example
to .env
. You will need a Reddit account with its client ID and client secret available, visit this page to register. To get a refresh token, visit this page and follow the instructions. To access the Imgur API, you will also need a client ID, visit this page to register. To run the tests, you will need a second account (with client ID and secret) to act as a regular user.
Additionally, please visit this page and download the latest version of the RabbitMQ Message Deduplication Plugin. Put the two *.ez
files into deployments/rabbit/plugins
.
Ensure your machine has Makefile and Docker installed and running. Run make setup
to arrange and start the Docker Compose network.
For now, you must add your subreddits manually (double check that your moderator account has Flair, Modmail, Posts/Comments, and Wiki permissions). Connect to the MySQL container and run:
INSERT INTO awb.subreddits(name, latest_utc) VALUES ('<your subreddit name>', UNIX_TIMESTAMP());
Once added, the program will auto-generate in your subreddit wiki a default configuration in the page named awb
if it does not already exist. Moderation settings are disabled by default until you enable them accordingly, but the program will start collecting submission and image data immediately. YAML format is used.
start
- start the deployment on docker-compose.setup
- create the SQL tables, if they do not exist.stop
- stop the deployment on docker-compose.restart
- stop and start the deployment on docker-compose.clean
- stop deployment and clear any data volumes.reset
- clean and setup deployment.start_dc
- start dependencies only (RabbitMQ, Celery, and MySQL).stop_dc
- stop dependencies and clear data volumes.
Run make integ
to have unittest run all the integration tests. Testing is mostly outdated and slow. It was intended to test version 1.0.
- Profile picture: source artwork by るびぃ on pixiv
- Banner: source image from the Fandom wiki, source font