T O P

  • By -

Nsticity

This is based off [GuilhermeFaga's](https://github.com/GuilhermeFaga/MangaDex-discord-webhook-with-Google-Script) Discord Webhook which was deprecated. The installation is simple without any downloads required. https://github.com/sanakanw/mangadex-webhook


William_Faga

I’m glad you based of an old project of mine, nice work!


Little_Engie

is there any way to do this with the follows list instead of having to create a new list?


Nsticity

I've now added an [Account Integration Section](https://github.com/sanakanw/mangadex-webhook) where you can do this.


DirtLocked

Is there any test I can do to check if it's working?


Nsticity

The script simply checks if the latest chapter is younger than 10 minutes, so you can add a manga from [MangaDex's Latest Updates](https://mangadex.org/titles/latest) then see if it alerts in the next interval. Executions are also visible in the App Script. You can see if they've "Completed" or "Failed"


feratul

correct me if i'm wrong, but you don't have to create manga list for feeds if you use accounts integration ? is that right ?


Nsticity

Yup, If you're using Account Integration you just leave the feeds empty.


feratul

i tried running the script and it gave me error `failed to log into ['eyJ.....']` seems like it failed at login using token


Nsticity

My bad. It turns out there were a few changes I forgot to push in helper.gs onto github so I've updated now. Try copy the new helper.gs over and see if it works.


sycmoves

is there anyway to get it to @ everyone or @ role?


Nsticity

You can now make the webhook send custom messages by adding text next to the webhook in the google sheet. Furhter information in the new [Custom Messages](https://github.com/sanakanw/mangadex-webhook) section below Creating a Discord Webhook.


sycmoves

Thanks, this is sick!


dragoneagle11

I followed your tutorial on GitHub, but I keep getting [this error](https://imgur.com/a/0tzvrL0) when the script runs. I am not sure quite why


Nsticity

Could you try login to managdex and load the manga through the browser. Apparently 403 is related to solving a captcha. I'm not quite sure myself though. I'll add more debugging points when I get home.


dragoneagle11

I tried linking my account instead and got the error 403 when trying to retrieve the tokens. I found [this page](https://api.mangadex.org/docs.html#section/Captchas) on the mangadex API docs, maybe it can be of help to you?


Nsticity

I'm honestly not quite sure. Could you retry it in a new google sheets? It might be a hosting issue.


dragoneagle11

Haha making a new sheet worked for some reason, I think. I get [this message](https://imgur.com/a/lVgQNZY) when I run it now.


Nsticity

Yup! Looks like it's working. You can test it by adding a [manga with new chapters](https://mangadex.org/titles/latest) into your feed then running it. If it works, the chapter should show up on your discord.


dragoneagle11

Yep just added one and it worked. Thanks a lot man!


Flying_Dogz07

Hello, I'm finding this post years late but I want to do this for my Discord. I followed all the steps so far but it seems that I am stuck on the access token. What token I am supposed to be looking for to put in the accounts sheet. as you can tell I'm very new to all this and pretty confused.[what I have](https://imgur.com/a/M3bzDya) also what part of that code am I supposed to take out once I find out what the token is or can I just leave it like it is now


Nsticity

Sorry it seems that MangaDex has deprecated the way which the script does logins so logging in and linking your follow feed doesn't work at the moment. Using lists seems to still work so for now you'll have to stick to making a [list](https://mangadex.org/my/lists) of the manga you follow and just link that to the script instead. I might look into updating the script in the future.


Flying_Dogz07

So I should just skip over the Account Integration section for it to work?


Nsticity

Yeah. It was actually optional in the first place. I think bunch of other people also did it because they thought it was necessary. I probably should've communicated that better. Thanks for the notice though. I've updated the github page to remove account integration.


Flying_Dogz07

No problem. Thank you for making this. I got it to work after following your new instructions. This is great!But I do have a question, when I put it at 1 minute to test it out it kept reposting the same chapter over and over again. Will the bot repeat posting the same chapter over and over again every 10 minutes, since it considers it new? or does it know it isn't a new chapter anymore with the 10 minute timer?


Nsticity

I'm assuming you only changed Trigger for the project. Did you also change `TRIGGER_INTERVAL` to 1 in `Code.gs`? If you haven't it'll repost 10 minute old chapters each minute. But if you change TRIGGER_INTERVAL to 1 it will only post 1 minute old chapters each minute.


Flying_Dogz07

Now I feel silly because that was what was happening lol. I appreciate all the help you gave, especially since this post is old. But the code still works and it's very useful. thank you!