Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3575
  • Joined

  • Last visited

Everything posted by Dr. McKay

  1. It's all in the docs. offerList gets emitted whenever the offer list is retrieved, no matter what queried for it. Including polling.
  2. There is no mechanism in steam-tradeoffer-manager to automatically cancel incoming offers, because there's no real technical need to do that since there's no limit on incoming offers like there is for sent offers. You'd need to implement it yourself, ideally using the offerList event to watch for a list of offers and declining those that are too old for you.
  3. This is normal. When a trade is completed, the Steam backend makes two HTTP requests to the item server per item, and those requests aren't quick (something in the ballpark of 500ms per item I think). So if you're doing a really big trade, the request in which it's completed (if the offer recipient is only receiving items, the request to accept the offer, otherwise, the request to confirm it) will timeout after 30 seconds, but the trade will keep committing on the server. And it seems that while a trade is committing the rest of the API gets cranky for your account, probably because it doesn't feel like playing ball while a trade is in progress.
  4. In your if you probably want to check .length.
  5. That's because message === "!say" is checking if message is exactly "!say", when I believe you want to see if it starts with "!say". To check if it starts with "!say" you want to do if (message.indexOf("!say ") === 0)
  6. The language is only needed to get descriptions, yes. I honestly couldn't tell you why some trading cards would have empty market_hash_names. I know some items in non-Valve games have empty market_hash_names, but trading cards should always have one. Maybe you're getting bad data from Steam when it's being glitchy or something. Do you have an example of some such cards?
  7. You can download game files: https://github.com/DoctorMcKay/node-steam-user/blob/master/doc/CDN.md But this is an alpha feature and you'd have to figure out yourself what you need to do in order to get the proper Steam client to recognize the games and play them.
  8. I don't believe there's anything in any library to do it, you'd need to send the request yourself. You could open a GitHub issue on node-steamcommunity and I'll get around to adding it at some point.
  9. You're comparing against the entire enum. You need to do SteamUser.EFriendRelationship.RequestInitiator.
  10. https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#events
  11. You can't play games on the same account in more than one location. Once you launch a game on another instance, the first one will be booted from Steam. I think you've figured this out. When the error event is emitted, your bot is no longer connected to Steam. You'll need to log back on if you want to remain connected. You can use playingState to see if you're in-game elsewhere. So, for example, if you wanted to launch your games only if the account isn't currently in use, you'd want to set a timer (setTimeout) once you're logged on for say 5 seconds, and if you get playingState telling you that you're in-game elsewhere, cancel the timer. Once the timer elapses, launch your games.
  12. Create the code using https://www.npmjs.com/package/steam-totp
  13. Just console.log the item to see what's available. Did you set a language in the constructor? There won't be too much interesting data available if you don't.
  14. Most likely it just won't let you redeem the key if you already own everything in the package it would grant you.
  15. Just call client.gamesPlayed again with a different AppID.
  16. You need to pass craft an array of item IDs you want to craft together. Right now you're just passing in one metal per craft, so it's smelting the metal down because that's all it can do with one metal.
  17. https://lab.xpaw.me/steam_api_documentation.html#ISteamUser_GetPlayerSummaries_v2
  18. "[g:1:id]"
  19. You need quotes around it. It's a string.
  20. You can use either the 64-bit one or the ID in the edit page, if you put the edit page ID into this formula: [g:1:id] For example [g:1:4] -> https://steamcommunity.com/gid/[g:1:4]
  21. https://github.com/DoctorMcKay/node-steamstore/releases/tag/v1.6.1 Thanks.
  22. You're either calling addMyItem or addTheirItem with an undefined item.
  23. Well, for one thing, you're using token to store your TradeOffer, then calling trade.sent(). But your issue is that you aren't listening for the callback, you're just assuming it worked immediately. You need to pass a callback to send() and check the offer ID once it is called.
  24. Either call trade.addMyItem to add items one-by-one, or call trade.addMyItems on the entire pool to add them all at once. addMyItem is for single items. addMyItems is for arrays of multiple items.
×
×
  • Create New...