The following python script create a Reddit bot that will auto-report content flagged as "Toxic" by our API to the subreddit's moderators.


Required Libraries:

apt-get install python3
pip3 install praw requests

Required config.json file:

  "subreddit": "subreddit",
  "threshold": CONFIDENCE_THRESHOLD (float)

The subreddit(s) to scan can be passed as a list of subreddits joined with a "+" -- for example, "reddit+politics+news." An example config file is provided below:

  "subreddit": "news+worldnews",
  "client_id": "G23Ap9HxVzZGW9cvH68a",
  "client_secret": "q-MScVnSE5i4UfnMucGZZs3avyX",
  "username": "toxicitymodbot",
  "password": "jH^cFU%V%Pf7&MMPA",
  "api_token": "f7835af37818e44fa22b5393e3330811",
  "threshold": 0.9