https://github.com/bachtran02/ed-discohook
A Python tool that monitors EdStem for new threads and publishes updates to Discord via webhooks using edspy.
https://github.com/bachtran02/ed-discohook
discord-webhook edstem
Last synced: 5 months ago
JSON representation
A Python tool that monitors EdStem for new threads and publishes updates to Discord via webhooks using edspy.
- Host: GitHub
- URL: https://github.com/bachtran02/ed-discohook
- Owner: bachtran02
- Created: 2023-11-15T06:07:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-17T17:57:03.000Z (about 1 year ago)
- Last Synced: 2025-03-17T18:32:01.889Z (about 1 year ago)
- Topics: discord-webhook, edstem
- Language: Python
- Homepage:
- Size: 171 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ed-discohook
A Python program that listens to [edstem](https://edstem.org/) websockets for new threads and publish events to [Discord](https://discord.com/) via [webhooks](https://discord.com/developers/docs/resources/webhook).
This project mainly makes use of [edpy](https://github.com/bachtran02/edpy), a Python wrapper for edstem API which I also maintain.
## Demo

## How to set up
### Docker (highly recommended)
> I have been running this program in a [Docker](https://docs.docker.com/engine/install/) container. [`docker-compose.yml`](https://github.com/bachtran02/ed-discohook/blob/main/docker-compose.yml) is included in the repo which
> makes building & running the program with [Docker Compose](https://docs.docker.com/compose/install/) inside of Docker very straightforward.
1. Clone the repo.
2. Create an .env file using [this template](https://github.com/bachtran02/ed-discohook/blob/main/.env.example) and enter your Ed API token, which can be created [here](https://edstem.org/us/settings/api-tokens).
3. In `.env` file, also enter Discord webhook URLs of the channels you want to send the payload to.
> Read more about Discord wehooks [here](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
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`](https://github.com/bachtran02/ed-discohook/blob/main/main.py#L13) of `main.py` so the secrets can be looked up and retrieved correctly in the main file.
4. Run `docker compose build` to build the project and then `docker compose up` to start running it.