- go to https://www.reddit.com/prefs/apps
- Create a new application and note down the id and the secret for later use
- In the Discord Client go to 'Server Settings'
- Go to Section 'Webhook'
- Create a new Webhook. Specify name and channel and copy the Link for the next step
- Create a
.env
file containing the key value pairs from thedotenv_template
file. - Substitute with the values obtained from the previous steps.
- Add the name of a subreddit.
For the following steps make sure the python version used is 3.7. Otherwise Pipenv will scream at you.
- install pipenv
python -m pip install
. - create the shell
pipenv shell
this will also load the values of the created.env
file. - run
pipenv install --ignore-pipfile
this will install the exact dependencies from the lockfile.
Now you can run the bot with python server.py
FETCH_SIZE
controls how many posts are fetched per loop. 10 by default.WAITING_TIME
How many minutes the program sleeps in between loops.