TomYoki Posted August 6, 2017 Report Posted August 6, 2017 Hello, I was wondering if it's possible to know if friend-request has been accepted after sending an invite.I looked through the module docs and couldn't find anything, but perhaps I've missed something? Thanks in advance. Quote
Vanilla Posted August 6, 2017 Report Posted August 6, 2017 Hello, I was wondering if it's possible to know if friend-request has been accepted after sending an invite.I looked through the module docs and couldn't find anything, but perhaps I've missed something? Thanks in advance. https://github.com/DoctorMcKay/node-steam-user#friendrelationship client.on('friendRelationship', function(steamID, relationship) { if (relationship == SteamUser.Steam.EFriendRelationship.Friend) { //this user became our friend on Steam //do something } }); Check enum here: https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EFriendRelationship.js Just a heads up, if someone send you friend request, event will be called and "relationship" is: 2 (RequestRecipient).And if you accepted the friend request, the "friendrelationship" event will be called again and "relationship" is: 3 (Friend). Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.