Jump to content
McKay Development

vrtgn

Member
  • Content Count

    60
  • Joined

  • Last visited

1 Follower

Contact Methods

  • Website URL
    https://steamcommunity.com/id/vrtgn/

Profile Information

  • Gender
    Male
  • Location
    United Kingdom

Recent Profile Visitors

349 profile views
  1. const url = `https://steamcommunity.com/profiles/${ offer.partner.getSteamID64() }`;
  2. let link = ""; for (let action of item.actions) { if (action.name === 'Inspect in Game...') { link = action.link; break; } }
  3. Are you sure offer.partner.getSteam64ID() == config.OwnerId is getting triggered correctly? Or maybe it is and the problem is with your acceptOffer function, I would recommend something like this: function acceptOffer(offer) { offer.accept((err) => { if (err) { console.log('There was an error accepting the offer'); return; } // if we have to give items we have to confirm, otherwise we dont have to if (offer.itemsToGive.length != 0) { community.acceptConfirmationForObject(config.identity_secret, offer.i
  4. No, you should check when you process the offer. It should be among the first things you check in the offer. You can't act on an offer (e.g. decline the offer) after you've accepted it which you are doing in the above code.
  5. client.webLogOn(); Sometimes your session can expire, so you can use this event: community.on('sessionExpired', err => client.webLogOn());
  6. What do you mean it is timing out? What error does it throw, if any?
  7. I think so, you may be able to solve this with polldata.
  8. This seems to work, though I'm getting an empty array: client.on('loggedOn', (details) => { console.log("Logged onto Steam as " + client.steamID.getSteam3RenderedID()); client.setPersona(SteamUser.EPersonaState.Online); let steamID = 0; client.getPersonas([steamID]).then(function ({ personas }) { let richPresence = personas[steamID].rich_presence; console.log((richPresence)); }); /* Above is the same as client.getPersonas([steamID]).then(function (obj) { let personas = obj.personas; // code
  9. // Get all active offers manager.getOffers(TradeOfferManager.EOfferFilter.ActiveOnly, (err, sent, received) => { // Loop through recieved trade offers and execute the processOffer function on each. if (received) { for (var i = 0; i < received.length; i++) { processOffer(received[i]); } } }); You could put the above in a setInterval. The processOffer function is the same thing that you do when you get the newOffer event. So if you have a large function like: manager.on('newOffer', offer => { // code }); You can change i
  10. let steamID = "76561198266614530"; manager.getOffers(TradeOfferManager.EOfferFilter.Active, (err, sent, recieved) => { sent = sent.filter(offer => offer.partner.getSteamID64() == steamID); // sent.length is equal to how many offers that are currently active have been sent to steamID }) I would use filter on the sent offers received from the getOffers method.
  11. manager.on('newOffer', offer => { if (offer.itemsToGive.length === 0) { offer.accept(err => err ? console.log('There was an error accpeting the offer!' : null); } });
  12. vrtgn

    Joshua

    client.steamID.getSteamID64();
×
×
  • Create New...