hyperlogin Posted June 22, 2017 Report Posted June 22, 2017 Help im not sure why the polling doesn't work. i tried setting a debug on manager but it does not display any messages i also tried turning firewall off also much help appreciated thanks this.client = new SteamUser(); this.community = new SteamCommunity(); this.manager = new TradeOfferManager({ steam: this.client, domain : 'domain', community: this.community, language: 'en', }); this.manager.on('newOffer', function(offer) { console.log("New offer #" + offer.id + " from " + offer.partner.getSteam3RenderedID()); offer.accept(function(err) { if (err) { console.log("Unable to accept offer: " + err.message); } else { community.checkConfirmations(); // Check for confirmations right after accepting the offer console.log("Offer accepted"); } }); }); this.manager.on('receivedOfferChanged', function(offer, oldState) { console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); if (offer.state == TradeOfferManager.ETradeOfferState.Accepted) { offer.getExchangeDetails((err, status, tradeInitTime, receivedItems, sentItems) => { if (err) { console.log(`Error ${err}`); return; } // Create arrays of just the new assetids using Array.prototype.map and arrow functions let newReceivedItems = receivedItems.map(item => item.new_assetid); let newSentItems = sentItems.map(item => item.new_assetid); console.log(`Received items ${newReceivedItems.join(',')} Sent Items ${newSentItems.join(',')} - status ${TradeOfferManager.ETradeStatus[status]}`) }) } }); 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.