Ping discord webhook endpoints when a specified Manga releases a new chapter on MangaDex
Go to file
pfych e11d941a93
All checks were successful
Build and Push Container / build (push) Successful in 49s
Update embed style to reflect native embeds
2025-04-30 19:36:01 +10:00
.gitea/workflows Correctly configure eslint & fix general issues 2025-04-20 14:37:23 +10:00
src Update embed style to reflect native embeds 2025-04-30 19:36:01 +10:00
.eslintrc.js Correctly configure eslint & fix general issues 2025-04-20 14:37:23 +10:00
.gitignore Init 2025-04-20 12:52:11 +10:00
docker-compose.yml Added Docker 2025-04-20 13:46:47 +10:00
Dockerfile Reduce docker container size by ~100MB 2025-04-30 19:24:18 +10:00
package.json Reduce docker container size by ~100MB 2025-04-30 19:24:18 +10:00
pnpm-lock.yaml Reduce docker container size by ~100MB 2025-04-30 19:24:18 +10:00
README.md Allow hot-reload of config.json 2025-04-20 15:30:05 +10:00
tsconfig.json Correctly configure eslint & fix general issues 2025-04-20 14:37:23 +10:00

Manga Update Tracker

Small Node script that tracks updates on MangaDex and sends a Discord webhook when a new chapter is released.

Setup

pnpm install
pnpm run compile

Config

Create a config.json in the root directory of the project, or alongside the script. It should look like the below example, you can add as many webhooks as you want, and as many MangaDex manga IDs as you want.

Manga IDs can be retrieved from the URL of the manga page on MangaDex, or by using the API.

https://mangadex.org/title/<manga-id>/<manga-name>

The Check Interval is how often the script will check for updates, in seconds.

MangaDex requires setting a userAgent when making requests to their API, Please set this to something unique to you.

{
  "checkInterval": 900,
  "userAgent": "https://git.pfy.ch/pfych/chapter-tracker (Run by your-email@example.com)",
  "mangaByWebhook": {
    "https://discord.com/api/webhooks/id/token": [
      "9d3d3403-1a87-4737-9803-bc3d99db1424",
      "cb1b1da5-9436-49f5-8a6b-a1689fb86d91",
      "9a957884-d1be-48b1-a90c-85686aa16430"
    ],
    "https://discord.com/api/webhooks/id2/token2": [
      "9d3d3403-1a87-4737-9803-bc3d99db1424"
    ]
  }
}

Once the config is set up you can run the script:

node .out/build.js # Or wherever the script is located

Docker

You can also run the script in a Docker container:

services:
  checker:
    image: git.pfy.ch/pfych/chapter-tracker:latest
    volumes:
      - "./config.json:/checker/config.json"
      - "./mangaHistory.json:/checker/mangaHistory.json" 

Ensure that config.json and mangaHistory.json exist & are valid json files before running the container.