Reddit script that deletes your comments when they are downvoted below a threshold.
Before starting, PRAW must be installed on the machine. On a Windows system, the batch file can be used. Alternatively, if pip is installed on the machine, the command below may be used.
pip install praw
Instructions for setting up a Reddit application to use KarmaGuardian:
- Log-on to Reddit and go to preferences.
- Go to the apps section.
- At the bottom of the page, click create another app....
- Fill out relevant information, i.e. shown below:
- You will now be able to see your client ID and client secret!
Instructions for setting up and running KarmaGuardian for your Reddit account:
- Clone the repository or download the files.
- Open the config.py file and replace XXXXXXXXX with relevant details.
##REDDIT BASICS###
#More information here: https://praw.readthedocs.io/en/latest/getting_started/quick_start.html
username = 'XXXXXXXXX' #This is your reddit username, i.e. spez
password = 'XXXXXXXXX' #This is your reddit password, i.e hunter2
client_id = 'XXXXXXXXX' #This is the client ID received after creating an application.
client_secret = 'XXXXXXXXX' #Client secret received after creating an application
user_agent = "XXXXXXXXX" #A descriptive user agent to help Reddit determine source of requests
##KarmaGuardian Parameters###
threshold = -2 #Minimum comment score before it is deleted
- Run KarmaGuardian.py using the command line using "python KarmaGuardian.py".
- The script will delete comments with a score of below the threshold every 60 seconds.