Jump to content
McKay Development
Snavellet

community.getSteamUser is not a function -- help please

Recommended Posts

client.on('friendRelationship', (sid, relationship) => {
if(relationship == SteamUser.EFriendRelationship.RequestRecipient) {
console.log(`Friend request from: ${sid.getSteamID64()}`)
console.log(`Checking if ${sid.getSteamID64()} is scammer.`)
rep.isScammer(sid.getSteamID64(), function(error, result) {
if(error) {
console.log(error);
} else {
if(result) {
console.log(`Declining friend request, ${sid.getSteamID64()} is a scammer.`);
client.removeFriend(sid)
} else {
console.log(`Accepting friend request, ${sid.getSteamID64()} is not a scammer.`);
community.getSteamUser(sid, (err, user) => {
if(err) {
console.error(err)
} else {
user.comment('test')
}
})
}
}
});
}
});

 

Share this post


Link to post
Share on other sites

// Set this to your Imports

let SteamCommunity = require("steamcommunity");

 

U must install it with "npm i steamcommunity", if u have a package.json file u can save it with "--save" after "npm i steamcommunity --save"

 

// Then make community instance of SteamCommunity

 

let community = new SteamCommunity();

 

Thats all ;)

Edited by CellSplitter

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...