cookie
-
Posts
62 -
Joined
-
Last visited
Posts posted by cookie
-
-
Not sure why i believe your code is ripped off from someone else
-
You'll get double callbacks.
forgot to add a return;
-
login with steam-user, listeon on webSession, set cookies for steamcommunity and steam-tradeoffer-manager
-
Just add it to the queue again / retry.
function getItems(offer, callback) { offer.getReceivedItems(function(err) { if (err) return getItems(offer, callback); }); }
Very bad there should be a timeout for this, because maybe the session got killed and it will keep recalling it forever.
-
As of v1.20.0, you can pass your own SteamCommunity to the constructor of TradeOfferManager. You can pass your own request to the SteamCommunity constructor and you can specify a proxy to request via request.defaults.
Sorry for grave digging but is this the best approach?
var request = require("request"); var TradeOfferManager = require('steam-tradeoffer-manager'); var steamcommunity = require("steamcommunity"); var proxyUrl = "http://" + user + ":" + password + "@" + host + ":" + port; var proxifiedRequest = request.defaults({'proxy': proxyUrl}); var community = new steamcommunity({request: proxifiedRequest}); var manager = new TradeOfferManager({community: community});
-
I don't believe you could do that without editing the module's code directly.
If you run the bot and send an offer manually, it'll trigger unknownOfferSent.
if(!callback) { return; } callback(new Error("Intentionally returned an error")); if(body && this.state == ETradeOfferState.PendingConfirmation) { callback(null, 'pending'); } else if(body && body.tradeofferid) { callback(null, 'sent'); } else { callback(new Error("Unknown response")); }
that will work I guess
-
Use update. That will update the offer from the API.
offer.update(function(err) { if (err) { console.log(err); } else { // now the offer is fresh from the WebAPI } });
Is Calling getOffer Will also update the offer the next time?
-
Sure, add a bad item to the offer.
No but I mean I want it to be sent but an error is thrown so I can debug my function in unknownOfferSent
-
Is there a way that I can intentionally make offer.send() returns an error?
-
Yes. It has the IP rate-limit I mentioned above.
Do you know what's the expected response in that scenario?
-
If you're sending like 20 offers per second then there might be an issue, but I highly doubt you have that kind of volume.
It's not difficult to just manually download
https://steamcommunity.com/profiles/[steamid]/inventory/json/[appid]/[contextid]
in whatever language and parse it.
does that url have limits?
-
def_index as the skin index?
-
The best way to make sure that you don't miss (many) confirmations is to use the same device ID for every confirmation request (on the account).
If you use my libraries for confirmations, then you'll always use the same device ID. If you use a node app alongside a real phone, then there can be problems.
Device ID as machine ID in steam-user ?
-
I don't imagine there's a massive difference unless you're doing heavy overhead tasks.
Well, consider of having an array of bots that needs to get working, I find it hard to come up with a proper way of executing each bot while looping through it therefore I stick into executing each bot in a single process.
-
I'm just saying if you are sending multiply items going to have to loop through the items. Whether the are in an object or array.
not necessarily, an array of items can be added without having a loop.
-
Using classid/instanceid to track a specific item doesn't work anyway.
-
Probably because your account is limited, to solve this deposit $5 into your steam account.
-
Clusters are designed for applications which have to process lots of things at once (like many user requests). Running bots is really not a good use for clusters.
I'm personally running 30 bots within the same node process on low-end VPSes and the only problems I'm having are Steam IP limits.
Is there a considerable performance boost when running all bots in a single node process?
-
unknownOfferSent gets canceled automatically.Have a whitelist of Offer IDs to confirm via steam-community OR cancel confirmations for unknownOfferSent Offers.- Have a light mode of the bot that will be memory efficient ?
More to be added soon, just out of my mind!
-
Many of my time is spent trying to optimizing the bot to work with this awful service steam provides, Error codes like 16 and Error: ETIMEDOUT are some examples, however it is unknown if the offer is sent or not. Any experience anybody would like to share? Possible solutions?
Also, when there's an error and the trade offer is sent means trade.id is true if it's false then surely the offer isn't sent? please check the code below:
trade = offers.createOffer(p); trade.send('', t, function(err, status){ if(err){ console.log(err); if(trade.id){ console.log('Offer sent whilst having an error'); //Do something } else { console.log('Offer isn\'t sent'); } } else { //Do something } }
-
Yes, a TradeOffer object has a confirmationMethod property as you describe.
The value of that property is different for each party in the trade. If you're the sender, then it's populated on send. A nonzero value in state CreatedNeedsConfirmation means that it's waiting on you to confirm it. A nonzero value in any other state means that you were required to initially confirm it using that method, but no further action is required on your part.
On the recipient's side, a zero value in state Active means you haven't tried to accept it yet. A nonzero value in state Active means you need to confirm it using that method before the offer can be accepted. A nonzero value in any other state means you previously had to confirm it using that method.
Alright! thanks for the explanation.
-
It still does some manual polls when you disabled timed polling.
Is that error perhaps fatal or unknown ? emitted via 'error' event?
-
Error polling for trade offers: Error: getaddrinfo ENOTFOUND api.steampowered.com
I set PollInterval to -1 but still got this error, is this error caught on the event 'error' ?
-
- Player 1 creates a trade offer and sends it to Player 2. Player 1 needs to confirm it: offer state is CreatedNeedsConfirmation and it's invisible to Player 2.
- Player 1 confirms the trade. It goes into state Active and both players can view it.
- Player 2 accepts the trade. It requires confirmation, but stays in state Active. Once accepted, the API for Player 2 says that confirmation_method is either 1 or 2 (previously 0) depending on email or mobile confirmations.
- Player 2 confirms the trade. It changes into state Accepted.
I understand from what you're saying that once you confirm it the confirmation_method will be != 0 prior player 2 accepting the offer. Great, I believe a TradeOffer property will contain confirmationMethod as the value of confirmation_method correct?
Getting logged out if logging in with the same acc from another IP/serv
in node-steamcommunity
Posted
I use a logonID option and I don't get my session killed.