Skip to content

ModerateHatespeech/Reddit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Reddit

Automatically moderate subreddits via API

Purpose

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

Requirements

Install requirements:

pip3 install praw requests

Required config.json file:

{
  "subreddit": "subreddit",
  "client_id": "REDDIT_APPLICATION_CLIENT_ID",
  "client_secret": "REDDIT_APPLICATION_CLIENT_SECRET",
  "username": "REDDIT_BOT_ACCOUNT_USERNAME",
  "password": "REDDIT_BOT_ACCOUNT_PASSWORD",
  "api_token": "MODERATE_HATESPEECH_API_TOKEN",
  "threshold": 1
}

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
}

About

Automatically moderate subreddits via API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages