Jump to content
McKay Development

Recommended Posts

Posted
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')
}
})
}
}
});
}
});

 

  • 2 weeks later...
Posted (edited)

// 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

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...