i am using tmi.js and i need to make it so that if someone subscribes or follows a bot makes an announce, in tmi.js therre is an event - subscribe, but what to do with follows?
Yeah, but how do i check it, i check if the time is equal to current time, well that will be very uneficcient, how do i keep track of whos already been, and when do i check if new followers arrived(sorry for bad english)
Until webhooks are added, you have to poll the API (the results are cached so it’s pointless polling too frequently). Keep track of the most recent follower, and then the next request you see if there are any more recent followers than the previous known most recent.
do we know how long the cache lives?
or, rather, is there an official definition of “polling too frequently”?
– I’ve been curious for a while if I’m allowed poll any faster
detecting follows seems really laggy, when compared to detecting subs & cheers
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.