TwitchLib.Api icon indicating copy to clipboard operation
TwitchLib.Api copied to clipboard

Follower Service Always Reporting New Followers

Open benrick opened this issue 6 years ago • 3 comments

When I start a FollowerService and watch the OnNewFollowerDetected event, it always starts off by reporting 100 new followers. They're not new followers. I don't think it's setting its cache when the service starts. This means it always considers everyone to be "new" for the first trigger of the event.

This is the version of TwitchLib I am referencing.

    <PackageReference Include="TwitchLib" Version="3.0.1" />

benrick avatar Oct 11 '18 17:10 benrick

You have to manually call "UpdateLatestFollowersAsync(false);" I thought I created a separate method though which called that internally. Something like "InitializeWithLatestFollowersAsync or something". Might be good to add that just for clarification.

RRickkert avatar Oct 11 '18 18:10 RRickkert

@RRickkert how did you want to attack this? In the Start() method? I know the follower code extends the base monitor class, so that might be a bit tricky.

swiftyspiffy avatar Oct 17 '18 05:10 swiftyspiffy

The suggestion in the pull request might actually solve this problem for the FollowerService. Writing that, we might actually be able to implement the same kind of thing for the LiveStreamMonitorService. Because that one also has a "StartedAt" which we can use instead of the FollowedAt! So no need to put that in the Start() method.

RRickkert avatar Jan 22 '19 18:01 RRickkert