Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3389
  • Joined

  • Last visited

Community Answers

  1. Dr. McKay's post in webSession expires, but loggin in again returns "Already logged on" was marked as the answer   
    SteamCommunity and TradeOfferManager need only cookies to operate. That's how they keep track of their session. SteamUser operates directly through Steam's CM servers, not through the web. It doesn't need cookies for anything; it's merely capable of creating them (via the CM). Thus, you can create cookies through either SteamUser or SteamCommunity, and then provide them to SteamCommunity and TradeOfferManager.
     
    If you're already logging in with SteamUser then cookies are created automatically, even if you don't request them. Thus, it's unnecessary (and potentially problematic) to also create them via SteamCommunity.
     
    Basically, you want:
    user.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) { throw err; } }); community.setCookies(cookies); }); community.on('sessionExpired', function() { user.webLogOn(); }); It's also potentially helpful to just automatically call webLogOn every 30-60 minutes, just to be sure that it's always fresh. And finally, don't run the same account in two places or else the cookies have a nasty habit of expiring prematurely.
  2. Dr. McKay's post in Check if a offer sent by the bot was accepted was marked as the answer   
    Listen for the sentOfferChanged event and see if the new state is Accepted.
  3. Dr. McKay's post in community.acceptConfirmationForObject is not a function was marked as the answer   
    Is steamcommunity up to date?
  4. Dr. McKay's post in about getUserInventoryContents was marked as the answer   
    Yes, it's rate-limited by Steam. I can't tell you what the limit is, exactly, as I don't work for Valve.
  5. Dr. McKay's post in RateLimitExceeded was marked as the answer   
    No. If the error event is emitted, it's always fatal and it will never retry on its own.
  6. Dr. McKay's post in how can i candle Steam guard app code was marked as the answer   
    promptSteamGuardCode is an option that must be set in the constructor, not in the logOn call.
  7. Dr. McKay's post in Why loadUserInventory doesn't return the market_hash_name? was marked as the answer   
    loadUserInventory is deprecated. Use getUserInventoryContents instead.
  8. Dr. McKay's post in addTheirItems add all items from a appID was marked as the answer   
    Fetch the inventory for only tradable items, then call addTheirItems with the raw array of items. I believe there is an example in the repo that does exactly this.
  9. Dr. McKay's post in Get Item's game appid was marked as the answer   
    The numbers which precede the market_hash_name are indeed the item's corresponding appid. All trading cards have that. You can also use the market_fee_app property.
  10. Dr. McKay's post in Polling file and max pending trades was marked as the answer   
    You could if you had some kind of delimiter, but I don't know why you'd want to do that. You can't just naively assign the same data to multiple bots' pollData property.
  11. Dr. McKay's post in Is it possible to cancel outgoing offers? was marked as the answer   
    You'd need to retrieve the TradeOffer object using getOffer or getOffers then call cancel() on that object.
  12. Dr. McKay's post in Error installing node-steamcommunity was marked as the answer   
    The npm name is just steamcommunity.
  13. Dr. McKay's post in about the captchas was marked as the answer   
    You may.
  14. Dr. McKay's post in How to check game invites? was marked as the answer   
    You'd need to use node-steam-user for that, node-steamcommunity wouldn't work. Look around for the invite-related events.
  15. Dr. McKay's post in fastest way sentOfferChanged to be fired? was marked as the answer   
    5 seconds should be reasonably safe. 10 seconds is definitely safe.
  16. Dr. McKay's post in problem with acceptConfirmationForObject() was marked as the answer   
    https://steamerrors.com/16
     
    No way to fix Steam timeouts. The only way to make the event faster is to lower your poll interval.
  17. Dr. McKay's post in Converting chat messages string to an integer. was marked as the answer   
    There is no way to represent a SteamID as a number in JavaScript, period. If you want to validate an individual SteamID from input, you can use regex: str.match(/^76561\d{12}$/)
  18. Dr. McKay's post in How many times I can cancel offer? was marked as the answer   
    You can only cancel an offer once. There's no limit on how many offers you can cancel on your account, though. If you send and cancel a million offers they might take notice.
  19. Dr. McKay's post in Is it possible to combine steam-user and steamcommunity? was marked as the answer   
    That's the correct way to do it. Make sure you aren't trying to do any authenticated stuff before the webSession event gets emitted.
  20. Dr. McKay's post in 'editProfile' and Profile Showcase was marked as the answer   
    Currently, profile showcases aren't really supported.
  21. Dr. McKay's post in How to make manager do something when trade succeded was marked as the answer   
    manager.offer doesn't exist. You want this:
    manager.on('receivedOfferChanged', (offer) => { community.postUserComment(offer.partner.toString(), 'Test'); });
  22. Dr. McKay's post in Called method busy, action not taken was marked as the answer   
    It's happening in getUserInventoryContents. That means that the Steam inventory servers are busy and you'll need to try again later.
  23. Dr. McKay's post in get someones friendlist was marked as the answer   
    Yes, use the WebAPI: https://lab.xpaw.me/steam_api_documentation.html#ISteamUser_GetFriendList_v1
  24. Dr. McKay's post in Adding Gems and Gem Sacks to trade. was marked as the answer   
    This is what the amount property is for.
  25. Dr. McKay's post in steamcommunity can't get all confirmations was marked as the answer   
    Yes, it's caused by different device IDs.
×
×
  • Create New...