Jump to content
McKay Development

1Life1Chance

Member
  • Posts

    18
  • Joined

  • Last visited

Recent Profile Visitors

311 profile views

1Life1Chance's Achievements

  1. That's possible? Can i see group history with node-steam-user?
  2. Hi. How i can use +60 account in same script ? I want to farm with this accounts, but i need my own script
  3. I'm trying like this ; client.getSteamLevels('STEAMID64', function(result){ console.log(result); }); But i getting a error; var accountids = steamids.map(function(steamID) { ^ TypeError: steamids.map is not a function
  4. Hello everyone. I want to check people levels in my friend list. How can i do this?
  5. I'm using this method, you can use this community.postGroupAnnouncement("GROUPID", headline, content, function (err) { if (err) { throw err; } });
  6. Hey! Anyone know how i can clear getGroupMembers cache ? I need this becase when i launch first time function it get members but after didn't get new members.
  7. This way have a some problems like sometime didn't get members list or update members list
  8. function kick (){ community.getGroupMembers('GROUPID', function(err, members) { community.kickGroupMember('USERID', function (err) { if (err){ console.log(err); } else { console.log('Good'); } }); }); } Hello. I want to kick some member of group. But i have a this error; events.js:136 throw er; // Unhandled 'error' event ^ TypeError: steamID.getSteamID64 is not a function at SteamCommunity.kickGroupMember (C:\Users\Lenovo\Desktop\Yeni klasör\node_modules\steamcommunity\components\groups.js:431:24) at C:\Users\Lenovo\Desktop\Yeni klasör\blue.js:241:13 at C:\Users\Lenovo\Desktop\Yeni klasör\node_modules\steamcommunity\components\groups.js:63:5 at Parser.<anonymous> (C:\Users\Lenovo\Desktop\Yeni klasör\node_modules\xml2js\lib\parser.js:303:18) at Parser.emit (events.js:159:13) at SAXParser.onclosetag (C:\Users\Lenovo\Desktop\Yeni klasör\node_modules\xml2js\lib\parser.js:261:26) at emit (C:\Users\Lenovo\Desktop\Yeni klasör\node_modules\sax\lib\sax.js:624:35) at emitNode (C:\Users\Lenovo\Desktop\Yeni klasör\node_modules\sax\lib\sax.js:629:5) at closeTag (C:\Users\Lenovo\Desktop\Yeni klasör\node_modules\sax\lib\sax.js:889:7) at SAXParser.write (C:\Users\Lenovo\Desktop\Yeni klasör\node_modules\sax\lib\sax.js:1436:13) Can you tell me what i did wrong ? Greetings.
  9. Hey guys. I have a some problems. Can you help me ? What can i do for this error?
  10. Hello guys. I know what is a amount code but I couldn't add in my script. Can you help me ? const SteamUser = require('steam-user'); const TradeOfferManager = require('steam-tradeoffer-manager'); const SteamTotp = require('steam-totp'); const SteamCommunity = require('steamcommunity'); const fs = require('fs'); const request = require('request'); const config = require('./config.json'); const community = new SteamCommunity(); const client = new SteamUser(); const manager = new TradeOfferManager({ steam: client, domain: 'example.com', language: 'en' }); /* Polling Steam and Logging On */ client.logOn({ accountName: config.username, password: config.password, twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret) }); /* Getting prices */ const priceUrl = 'https://api.steamapi.io/market/prices/' + config.options.appid + '?key=' + config.options.apikey; function getPriceList() { if (!config.options.apikey) { console.log("UNABLE TO GET PRICELIST: steamapi.io API key not given. Please provide API key in config.json"); return process.exit(1); } request(priceUrl, (error, response, body) => { if (error || response.statusCode !== 200) return console.log(`Error: ${error} - Status Code: ${response.statusCode}`); fs.writeFile('prices.json', body); }); } function priceItemsInOffer(offer) { let offerValue = 0; if (offer) { const prices = require('./prices.json'); //Requiring price file //Loop through offer and get total price for (var x in offer) { prices[offer[x].market_hash_name] >= config.options.minPricePerItem ? offerValue += prices[offer[x].market_hash_name] : null; } } return offerValue; } //Make the first price request getPriceList(); //Auto Refresh price setInterval(getPriceList, config.options.priceRefreshInterval * 1000); /* Friend requests and chat */ client.on('friendRelationship', (steamID, relationship) => { if (relationship === 2 && config.options.acceptRandomFriendRequests) { client.addFriend(steamID); client.chatMessage(steamID, config.options.chatResponse.newFriend); } }); client.on('friendMessage', (steamID, message) => { console.log(config.options.chatResponse.commands[message]); if (config.options.chatResponse.commands[message]) { client.chatMessage(steamID, config.options.chatResponse.commands[message]); } else { client.chatMessage(steamID, config.options.chatResponse.unknownCommand); } }); /* Offer handling */ function isInArray(value, array) { return array.indexOf(value) > -1; } function acceptOffer(offer) { offer.accept((err) => { if (err) console.log(`Unable to accept offer: ${err.message}`); community.checkConfirmations(); }); } function declineOffer(offer) { offer.decline((err) => { if (err) return console.log(`Unable to decline offer: ${err.message}`); }); } manager.on('newOffer', function(offer) { const partnerID = offer.partner.getSteamID64(); offer.getUserDetails((err, me, them) => { if(err) return console.log(err); if(them.escrowDays > 0) { console.log('Trade is in escrow. Declining.'); declineOffer(offer); } }); console.log(`New offer # ${offer.id} from ${partnerID}`); if (isInArray(partnerID, config.adminIDs)) { client.chatMessage(partnerID, config.options.chatResponse.adminTrade); acceptOffer(offer); } else if (!offer.itemsToGive.length) { console.log(`${partnerID} just donated us items.`); client.chatMessage(partnerID, config.options.chatResponse.donation); //Sending message for donations acceptOffer(offer); } else if (priceItemsInOffer(offer.itemsToReceive) < config.options.minimumprice) { client.chatMessage(partnerID, config.options.chatResponse.junk); //Sending message for donations declineOffer(offer); } else if (priceItemsInOffer(offer.itemsToGive) > priceItemsInOffer(offer.itemsToReceive) * config.options.percentamount) { client.chatMessage(partnerID, config.options.chatResponse.tradeDeclined); //Sending message when trade declined declineOffer(offer); } else { client.chatMessage(partnerID, config.options.chatResponse.tradeAccepted); //Sending message for accepting offer acceptOffer(offer); } });
×
×
  • Create New...