This is a bot that uses the Reddit API to moderate the r/vegancirclejerk subreddit, which has over 100k members.
The bot is set to run every 30 minutes on Linux. The following instructions have been tested on Arch Linux.
- Go to
https://www.reddit.com/prefs/apps
. - Set the
name
tovcj_mod_bot
. - Set the
description
tohelps moderate r/vegancirclejerk (100k users)
. - Set the
about url
andredirect uri
tohttps://www.reddit.com/message/compose?to=/r/vegancirclejerk
. - Press
create app
. - Note that
REDDIT_CLIENT_ID
is underpersonal use script
. - Note that
REDDIT_CLIENT_SECRET
is labeled assecret
after pressing edit on your app.
git clone [email protected]:numemac/vcj-curator.git
- On Arch Linux you can just run:
sudo pacman -S python-praw
- Or you can create a venv and run
pip3 install vcj-curator/requirements.txt
- Copy the example service:
cp vcj-curator/systemd/example.vegancirclejerk.service vcj-curator/systemd/vegancirclejerk.service
- Edit the service with your favourite editor, e.g.,
vi vcj-curator/systemd/vegancirclejerk.service.
- WARNING: Putting your credentials in plain text is dangerous, consider using a secrets manager.
- Use the
REDDIT_CLIENT_ID
andREDDIT_CLIENT_SECRET
from step 1. - Set your
REDDIT_USERNAME
andREDDIT_PASSWORD
to match your mod account's info. - Be sure to replace the
/EXAMPLE/PATH
- Copy or symlink your
vegancirclejerk.service
file to~/.config/systemd/user/
.
ln -s vcj-curator/systemd/vegancirclejerk.service ~/.config/systemd/user/
ln -s vcj-curator/systemd/vegancirclejerk.timer ~/.config/systemd/user/
- Enable and start the service and timer:
systemctl --user enable vegancirclejerk.timer
systemctl --user enable vegancirclejerk.service
systemctl --user start vegancirclejerk.timer
Check that the service and timer are running:
systemctl --user status vegancirclejerk.timer
systemctl --user status vegancirclejerk.service