Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3545
  • Joined

  • Last visited

Everything posted by Dr. McKay

  1. You're not using this properly. In JavaScript, this references the parent object of the method at call-time. So for example: function exampleMethod() { console.log(this.name); } let obj1 = {"name": "obj1"}; let obj2 = {"name": "obj2"}; obj1.example = exampleMethod; obj2.example = exampleMethod; obj1.example(); // "obj1" because the "parent" to this call is obj1 obj2.example(); // "obj2" because the "parent" to this call is obj2 let example = obj1.example; example(); // undefined because there is no "parent" to example() in this call So when you do getInventoryContents(foo, bar, this.createOffer), when the module receives the callback, it sees this: TradeOfferManager.prototype.getInventoryContents(blah, callback) { // do stuff callback(); // no parent! so "this" will not be what you expect }; What you should do instead is: getInventoryContents(foo, bar, this.createOffer.bind(this)). Using the bind method "binds" the value of this before call-time.
  2. https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#acceptconfirmationforobjectidentitysecret-objectid-callback
  3. Check the x-eresult header.
  4. receivedOfferChanged or sentOfferChanged will be emitted with the offer's new state being Accepted when the trade comes out of escrow.
  5. No, it's not possible to disable another account's 2FA.
  6. I have no plans to create a TypeScript definition.
  7. It's not possible to get a user's owned games except through the WebAPI. You can get some profile details from steam-user. All you can get from steamcommunity or the WebAPI if a profile is private is their name/avatar/basic info. You can get profile info from steam-user's getPersonas if their profile is friends only and you are friends, but there is no way to get a completely private profile. Yes, you can change profile privacy from steamcommunity.
  8. I have not encountered this, personally. I would expect that there's nothing you can do about it.
  9. If it's empty then you're probably sending the request too quickly.
  10. Not every item is going to necessarily have market_actions. You need to check for each item to make sure that market_actions exists and isn't empty.
  11. You'll need to be a little clearer.
  12. As of v4.0.0, the first argument to all callbacks is err. See the release notes here.
  13. Sounds like your proxies aren't permitting traffic on non-HTTP ports. Update to v4.6.0 and try adding "webCompatibilityMode": true to your constructor options and see if that helps.
  14. 751 is LogOnResponse. Show your code, you probably did something wrong.
  15. You're calling logOff on a new SteamUser instance. You have to call it on the same instance that's already logged on.
  16. You can't. The cell ID isn't linked with your account, it's just used for connecting to servers. I have no idea. No. I don't believe such an event exists beyond probably an email.
  17. You're almost definitely being rate-limited by Steam to prevent spam.
  18. You should not do that. Use removeMyItem and removeTheirItem instead.
  19. That might work, but I wouldn't recommend using it as you'd be calling decline on offers that might have already been accepted. I would use offerList and check the creation time of the offers. I don't understand the question. sentOfferChanged is being emitted multiple times for the same offer with state 3? That looks correct. Actually, no. That's a bug. As a workaround you can use getUserDetails on the original offer that you're countering. Also, you should never reassign itemsToGive or itemsToReceive. Use the add(My/Their)Item(s) methods instead. You can't. You need to call it once per appid/contextid.
  20. The inspect link is under actions. You will need to replace %owner_steamid% and %assetid%.
  21. Replace user.value == 2 with client.myFriends[sid.toString()] == SteamUser.EFriendRelationship.RequestRecipient
  22. You won't be able to get the wear, no, but you should be able to get the inspect link. It won't be in getReceivedItems, but it'll be everywhere else, provided you set a language.
×
×
  • Create New...