Jump to content
McKay Development

yoba

Member
  • Posts

    11
  • Joined

  • Last visited

yoba's Achievements

  1. How can I check the offer that has already been sent? For example, there are 2 identical items. How can I exclude an item from inventory if this item has already been sent but not yet received in full
  2. After each trade, I want to complete the bot. And I want a separate bot that will monitor the limits.
  3. Is it possible to get an array of all active trades? For example: array = [ 'id' = > 123123, 'date' => 01.01.0000 00:00:00]
  4. I want to decline some trade offers not to exhaust the limits (30 sending,incoming etc). How I can decline offer by id? For example: I sent the offer -> If the offer was not accepted within 4 hours -> decline it. Thanks for your answers. Sorry for my english.
  5. I checked my account. There are no limitis on this account. But I still get an error: Error: Access Denied
  6. But, if you go through the browser - the trades are working. What is the problem? This limit applies only to the API?
  7. My function: function sendOrder ( logOnOptions, offerLink ) { var client = new SteamUser(); var manager = new TradeOfferManager({ "steam": client, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "example.com", // Our domain is example.com "language": "en" // We want English item descriptions }); var community = new SteamCommunity(); if (fs.existsSync('polldata.json')) { manager.pollData = JSON.parse(fs.readFileSync('polldata.json')); } client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey); // Get our inventory manager.loadInventory(730, 2, true, function(err, inventory) { if (err) { console.log(err); return; } if (inventory.length == 0) { // Inventory empty console.log("CS:GO inventory is empty"); return; } console.log("Found " + inventory.length + " CS:GO items"); // Create and send the offer var offer = manager.createOffer(offerLink); offer.addMyItems(inventory); offer.setMessage("Here, have some items!"); offer.send(function(err, status) { if (err) { console.log(err); return; } if (status == 'pending') { // We need to confirm it console.log(`Offer #${offer.id} sent, but requires confirmation`); community.acceptConfirmationForObject(logOnOptions.identySecrect, offer.id, function(err) { if (err) { console.log(err); } else { console.log("Offer confirmed"); } }); } else { console.log(`Offer #${offer.id} sent successfully`); } }); }); }); community.setCookies(cookies); }); manager.on('sentOfferChanged', function(offer, oldState) { console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); }); manager.on('pollData', function(pollData) { fs.writeFile('polldata.json', JSON.stringify(pollData), function() {}); }); } After calling it, I get an error: Logged into Steam Error: Access Denied at SteamCommunity.<anonymous> (/Users/code/Documents/node/steam/node_modules/steamcommunity/components/webapi.js:15:20) at Request._callback (/Users/code/Documents/node/steam/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/Users/code/Documents/node/steam/node_modules/request/request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/Users/code/Documents/node/steam/node_modules/request/request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip.<anonymous> (/Users/code/Documents/node/steam/node_modules/request/request.js:1091:12) at Gunzip.g (events.js:291:16) Please help me
  8. Logged into Steam { Error: There was an error sending your trade offer. Please try again later. (15) at Object.exports.makeAnError (/Users/code/Documents/node/steam/node_modules/steam-tradeoffer-manager/lib/helpers.js:12:12) at SteamCommunity.manager._community.httpRequestPost (/Users/code/Documents/node/steam/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:513:12) I do not understand why I get this error. What am I doing wrong? I already read about this error. But there are no restrictions on my accounts, what could be the problem?
  9. Please help with my problem. I do not know why the 'appid' is not defined Stack trace: Logged into Steam /Users/user/Documents/node/steam/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:419 if (typeof details.appid === 'undefined' || typeof details.contextid === 'undefined' || (typeof details.assetid === 'undefined' && typeof details.id === 'undefined')) { ^ TypeError: Cannot read property 'appid' of undefined at addItem (/Users/user/Documents/node/steam/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:419:20) at TradeOffer.addTheirItem (/Users/user/Documents/node/steam/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:374:9) at manager.loadUserInventory (/Users/user/Documents/node/steam/project4.js:80:12) at SteamCommunity.<anonymous> (/Users/user/Documents/node/steam/node_modules/steamcommunity/components/users.js:331:5) at Request._callback (/Users/user/Documents/node/steam/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/Users/user/Documents/node/steam/node_modules/request/request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/Users/user/Documents/node/steam/node_modules/request/request.js:1171:10) at emitOne (events.js:96:13) Code: function sendRandomItem() { const partner = 'partner_code'; const appid = 730; const contextid = 2; const offer = manager.createOffer(partner); manager.loadInventory(appid, contextid, true, (err, myInv) => { if (err) { console.log(err); } else { const myItem = myInv[Math.floor(Math.random() * myInv.length - 1)]; offer.addMyItem(myItem); manager.loadUserInventory(partner, appid, contextid, true, (err, theirInv) => { if (err) { console.log(err); } else { const theirItem = theirInv[Math.floor(Math.random() * theirInv.length - 1)]; offer.addTheirItem(theirItem); offer.setMessage(`Will you trade your ${theirItem.name} for my ${myItem.name}?`); offer.send((err, status) => { if (err) { console.log(err); } else { console.log(`Sent offer. Status: ${status}.`); } }); } }); } }); }
×
×
  • Create New...