Closed vagneralbino closed 7 years ago
I'll do tests later today when I get a chance, but did you properly use the callback and not the return of the function itself?
For example:
let channel = "vagneralbino";
let user = "skhmt";
TAPIC.isFollowing(channel, user, res => {
if ( res.isFollowing ) console.log( 'Following since: ' + res.dateFollowed );
else console.log( 'Not following.');
});
Instead of res =>
I used function( res )
, but I believe both work the same way? The rest looks pretty much the same.
Either way, just to make sure, I tried your suggestion and it also had the same results. Thanks again!
Oops, they're supposed to be user ids, not usernames, you're right. I'll look in to it more later!
I think I fixed it, but I can't re-build until tonight. Changes were added to git, so feel free to try it out. Download the repo and navigate to it in your terminal/command line, then run:
npm install
npm run build
Fixed in 5.0.1
Thanks for such a useful application! I'm an aspiring web developer, and so far your code has been extremly helpful.
Are you still maintaining this code? I've run into a problem that the function isFollowing always returns true. I noticed that Twitch now requires requests to be made with user ID (as opposed to usernames), but even when I use the ids, the function returns true, even when Twitch returns with the error that the user is not following. I've looked into the code, but unfortunately I can't figure out what is going on by myself.
Is there any chance you could look into this issue? Thanks a lot!