Slime got a reaction from
root89 in How to get an array of the users whom relationship is 2 (Waiting for friend request to accept)?
Thanks for the info and the quick answer as always. i've made this and it works if anyone wants it:
client.on('friendsList', function () {
console.log("Searching for friend requests...");
for (var i = 0; i < Object.keys(client.myFriends).length; i++) {
if (client.myFriends[Object.keys(client.myFriends)[i]] == SteamUser.EFriendRelationship.RequestRecipient) {
console.log("Added " + Object.keys(client.myFriends)[i]);
client.addFriend(Object.keys(client.myFriends)[i]);
client.getChatHistory(Object.keys(client.myFriends)[i]);
}
}
});