A Python program that listens to edstem websockets for new threads and publish events to Discord via webhooks. This project mainly makes use of edspy, a Python wrapper for edstem API which I also maintain.
I have been running this program in a Docker container.
docker-compose.yml
is included in the repo which makes building & running the program with Docker Compose inside of Docker very straightforward.
- Clone the repo.
- Create an .env file using this template and enter your Ed API token, which can be created here.
- In
.env
file, also enter Discord webhook URLs of the channels you want to send the payload to.
Read more about Discord wehooks here
It is a good practice not to put Discord webhook URLs in the main.py
, so you may want to store them in the .env
as well. You can use any variable name as you like, just make sure
the names are matched in this part
of main.py
so the secrets can be looked up and retrieved correctly in the main file.
- Run
docker compose build
to build the project and thendocker compose up
to start running it.