vrtgn
Member-
Posts
61 -
Joined
vrtgn's Achievements
-
I think it would simply boil down to how you are running the bots, if in the same program, then probably saving to a file, and reading from it (when it needs to be used) would be a good option because keeping inventories in memory, especially large ones, isn't the best of ideas.
-
const url = `https://steamcommunity.com/profiles/${ offer.partner.getSteamID64() }`;
-
vrtgn reacted to a post in a topic: Can a Steam-Bot enter a csgo vac secured server?
-
vrtgn reacted to a post in a topic: Do AssetIDs change?
-
vrtgn reacted to a post in a topic: Do AssetIDs change?
-
Can't get item link from getUserInventoryContents
vrtgn replied to aatmjeets's topic in node-steam-tradeoffer-manager
let link = ""; for (let action of item.actions) { if (action.name === 'Inspect in Game...') { link = action.link; break; } } -
Dr. McKay reacted to a post in a topic: Getting the eresult.
-
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.id, (err) => { if (err) { console.log('There was an error confirming the offer'); return; } console.log('Accepted and confirmed the offer'); }) } else { console.log('Accepted the offer'); } }) }
-
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.
-
Op1x3r reacted to a post in a topic: Login to steam after disconnect.
-
Yes
-
client.webLogOn(); Sometimes your session can expire, so you can use this event: community.on('sessionExpired', err => client.webLogOn());
-
What do you mean it is timing out? What error does it throw, if any?
-
I think so, you may be able to solve this with polldata.
-
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 }); */ });
-
// 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 it to: manager.on('newOffer', offer => processOffer(offer)); function processOffer(offer) { // code } And so then you can process an offer from elsewhere.
-
vrtgn reacted to a post in a topic: inviteToGroup
-
vrtgn reacted to a post in a topic: Is there any risk of ban for using this package?
-
acceptConfirmationForObject Sometimes Doesn't Response
vrtgn replied to sergun's topic in node-steam-tradeoffer-manager
What is your code? You may not be error handling. -
how to check if user has atleast 1 active offer
vrtgn replied to DLC-EM_exchangebot's topic in node-steam-tradeoffer-manager
let steamID = "7656"; 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. -
CUTONI8 reacted to a post in a topic: Error: ETIMEDOUT and reload cookies
-
manager.on('newOffer', offer => { if (offer.itemsToGive.length === 0) { offer.accept(err => err ? console.log('There was an error accpeting the offer!' : null); } });