Hi, quick question. i'm trying to display my current online friends with persona_state >= 1 in the console for debugging at the moment to do some stuffs with it. If i check for them in:
client.on('user', function(steamID, user) {
console.log(_.size(client.users));
});
with this code i get the size of the array that is my number of "friends" i can filter only online friends with persona_state cool. But the thing is i get in the console repeated messages displaying the users count. I understand this event is updated when something changes according to the documentation. That's why my code is emitting this value as this gets updated and doing something like this: My question is, how can i check this when my bot fully updated the friends states not duplicating the message? i did it outside the event and my bot yells "0" when is launching. i'm fairly new at coding and picked this as a project for fun. Thank you. Sorry for my english, not my native language.