Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watchers #12

Open
Mobilpadde opened this issue Apr 1, 2017 · 2 comments
Open

Watchers #12

Mobilpadde opened this issue Apr 1, 2017 · 2 comments

Comments

@Mobilpadde
Copy link

Mobilpadde commented Apr 1, 2017

Would it be possible to retrieve all the users within a channel, and get notified whenever a user enters/leaves?

This'd probably be helpful: https://dev.twitch.tv/docs/v5/guides/irc/#roomstate-twitch-tags

@kritzware
Copy link
Owner

Great idea! Event emitters in general is something I'd like to work on. For Example;

Bot.on('resub', (err, chatter, sub) => {
    console.log(sub.months) // Emitted on user sub/resub
})
Bot.on('slow-mode', (err, chatter, event) => {
    // Emitted when slow mode is toggled in channel
})

I imagine the ones you mention being usable like this,

Bot.on('joined', (err, chatters) => {
    // Returns array of chatters who joined channel
})
Bot.on('parted', (err, chatters) =>{
    // Returns array of chatters who left channel
})

@Mobilpadde
Copy link
Author

Yea, that's exactly what I need :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants