Closed whitepapercg closed 3 years ago
Why would we swear?
You title says "subscriber" but the post says "follower" so I'll give you both:
To determine if a user is a subscriber in a chat message, check the badges object in the tags for "subscriber":
client.on('message', (channel, tags, message, self) => {
if(self) return;
const { badges = {} } = tags;
if(badges.subscriber) console.log(tags.username, 'is a sub');
});
tmi.js
has no way to determine a follower, you need to use either the Helix (new) or Kraken (old) API. This is unrelated to tmi.js
and that official documentation has plenty of information.
Hello! I am a newcomer, so please do not swear too much. My searches are at a dead end. I need to check if the user is a follower to the channel. Is there a ready-made solution for this? Can you help me?