# Manga Update Tracker Small Node script that tracks updates on MangaDex and sends a Discord webhook when a new chapter is released. ## Setup ```shell 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// ``` 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. ```json { "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: ```shell node .out/build.js # Or wherever the script is located ``` ## Docker You can also run the script in a Docker container: ```yaml 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.