Snavellet Posted May 20, 2019 Report 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
Dr. McKay Posted May 21, 2019 Report Posted May 21, 2019 If I had to guess, I'd say that community isn't an instance of SteamCommunity. Quote
CellSplitter Posted May 31, 2019 Report 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
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.