Snavellet Posted May 20, 2019 Report Share Posted May 20, 2019 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')}})}}});}}); Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 21, 2019 Report Share Posted May 21, 2019 If I had to guess, I'd say that community isn't an instance of SteamCommunity. Quote Link to comment Share on other sites More sharing options...
CellSplitter Posted May 31, 2019 Report Share Posted May 31, 2019 (edited) // Set this to your Importslet 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 May 31, 2019 by CellSplitter Quote Link to comment Share on other sites More sharing options...
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.