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

Error in Example ? #1

Open
headwarsun opened this issue Nov 23, 2015 · 2 comments
Open

Error in Example ? #1

headwarsun opened this issue Nov 23, 2015 · 2 comments

Comments

@headwarsun
Copy link

Hello,
Thank you for this bundle ! There might be an error in your README.md, in your example you wrote

nodecg.on('follower', function(follower) {

shouldn't it be

nodecg.listenFor('follower', function(follower) {

instead ? As I can't see any on() method in the nodecg API

Edit: managed to make it work with nodecg.listenFor('follower', 'bubu-followers', function() ...) but we've found an issue : the follow event is correctly triggered when a user follows the channel, but also when he unfollows and follows again, Is there a way to be notified only the first time a user follows the channel ?

@headwarsun
Copy link
Author

Never mind, the solution for the follow event to be triggered only once if a viewer unfollows and follows the channel again is to implement a simple history database (containing, for example, the 50 or 100 last followers name).

The example in README.md is still wrong though.

@ProbablePrime
Copy link

Its for an older version of nodecg yes.

.on -> .listenFor and you'll be good to go

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

No branches or pull requests

2 participants