Jump to content


Photo

Checking if a steam64 id is your friend?

node.js node-steamcommunity

Best Answer Royalgamer06 , 08 May 2018 - 08:43 PM

Assuming you are logged in (user = steam-user instance, steamid = steamid64):
 

function isSteamFriends(steamid) {
    return Object.entries(user.myFriends).filter(e => e[1] === SteamUser.Steam.EFriendRelationship.Friend).map(e => e[0]).includes(steamid);
}
Go to the full post


  • Please log in to reply
1 reply to this topic

#1 QuestionRealQuick1

QuestionRealQuick1

    Member

  • Member
  • PipPip
  • 28 posts

Posted 02 May 2018 - 11:22 AM

Title says it all.

How would i go about checking if a steamid64 is your friend?

am having some crashing issues with my bot attempting to message non friends.



#2 Royalgamer06

Royalgamer06

    Advanced Member

  • Member
  • PipPipPip
  • 94 posts

Posted 08 May 2018 - 08:43 PM   Best Answer

Assuming you are logged in (user = steam-user instance, steamid = steamid64):
 

function isSteamFriends(steamid) {
    return Object.entries(user.myFriends).filter(e => e[1] === SteamUser.Steam.EFriendRelationship.Friend).map(e => e[0]).includes(steamid);
}

  • QuestionRealQuick1 likes this





Also tagged with one or more of these keywords: node.js, node-steamcommunity

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users