eaceaser / bubu-followers

NodeCG Followers Tracker
MIT License
6 stars 4 forks source link

Error in Example ? #1

Open headwarsun opened 8 years ago

headwarsun commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

Its for an older version of nodecg yes.

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