Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3365
  • Joined

  • Last visited

Everything posted by Dr. McKay

  1. You can't perform authenticated requests before you're logged in. You aren't logged in until the loggedOn event is emitted. What your code is doing is starting the login process, then immediately before it completes you're trying to send an offer. Obviously, that's not gonna work.
  2. Your timeout should be for calling the callback, not for calling LogOn again.
  3. https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#uploadavatarimage-format-callback
  4. You should probably wait for the sentOfferChanged event to be emitted with the offer's state being Active before you add it to your database.
  5. You need a code every time you login if you're using TOTP/mobile authenticator.
  6. You should add a delay before you attempt to relog if your code was wrong. A wrong code will continue to be wrong for up to 30 seconds. What happened there was that your code was already used when you tried to login, so Steam failed your login and told you that your last code was wrong. Then you tried to login 15 more times with the same incorrect code. For obvious reasons, Steam blacklisted your IP for a short time.
  7. You can't. You can add a friend via steamcommunity, however.
  8. Read the documentation please. There are events for everything you just described.
  9. You should make it stop restarting the script a lot of times.
  10. Use steamID.toString() instead of JSON.stringify.
  11. https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOffer#getreceiveditemsgetactions-callback
  12. The steamID property will be null if you aren't connected. It'll be a SteamID object if you are.
  13. Assuming all items are CS:GO items... var offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=123456&token=xxxxxx"); offer.addMyItems([ { "appid": 730, "contextid": 2, "assetid": "6908727870" }, { "appid": 730, "contextid": 2, "assetid": "6901768067" } ]); offer.addTheirItems([ { "appid": 730, "contextid": 2, "assetid": "847548541" }, { "appid": 730, "contextid": 2, "assetid": "325415748" } ]); offer.send(function(err, status) { if (err) { throw err; } console.log("Offer #" + offer.id + " is now " + status); });
  14. Just keep trying to accept it. As far as I can tell, error 28 just means Steam is being bad.
  15. Yeah it only happens when an HTTP request fails. If you aren't making requests then it won't be emitted.
  16. There might be some confusion here. The expires property is Steam's expiration date, which is always 14 days from creation time and can't be changed. cancelTime works independently of it.
  17. I started working on that some time ago but I had to put it on hold. Maybe I'll get around to it soon. Pull requests are always welcome.
×
×
  • Create New...