Working on a multifunctional discord-bot that should also be able to report when a streamer goes live, I got my first chance of working with webhooks. Now in the docs here it reads that
Notifications are sent within seconds of event occurrence.
However when sending a subscription request for my bots account and after that going live with it, it takes somewhere between 2.5 and 3.5 minutes from what I’ve seen so far. I do not have any delays set and the stream goes live on the main page ~10 seconds after starting it in OBS.
First I suspected heroku (where I am currently hosting it for development) to somehow delay the request (no clue why that would be but I had some issues with heroku in the past) but using a rest-Client Plugin I can confirm that that is not the case.
So I am wondering: Why is there such a big delay between a channel going live and the webhook sending a request? Is it to prevent on-off-streams from flooding the API or am I missing something?
The webhook subscription works perfectly; the only thing is that the POST request has a big delay.
Thanks for help in advance!
If there is any code you think that could be relevant don’t hesitate to ask!