I found a Python library called praw or The Python Reddit API Wrapper, I've done some work with this library a while ago for creating simple bot. In this case, I think about watching a subreddit from Discord without opening browser.
I've made few codes, but its limited to fetch new post from subreddit. I am not a guy with educate skill but I'll make this simple and clear.
(run locally) set environment variable for:
Then install dependencies, just type
pip install -r requirements.txt
Run the app.
***idk how to deal with this, run worker manually after deploying, go to heroku app > resource > worker
Originally created for grabbing meme from r/Hololive.
The logic is quite simple, run a loop within checking latest post, then send post request to discord with their webhook integration, so I can watch every new post that user posted on the subreddit. (detailed code included)
We don't want to run this locally 24/7 because of electricity bill, so we need a plaform that can run any script as workers.
In this case, we need save $ at any cost. We choose Heroku (Free tier) and we got hours that enough for one month (1 dyno).
Deploy yourself, there is a button for instant deploy.
Well, this originally was created for fetching latest post from r/Hololive, but it fits for any subreddit I think.