Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3389
  • Joined

  • Last visited

Community Answers

  1. Dr. McKay's post in httpRequestGet to store.steampowered.com was marked as the answer   
    You should be able to use it on store.steampowered.com. When you use setCookies in SteamCommunity, it'll set them for steamcommunity.com, store.steampowered.com, and help.steampowered.com.
  2. Dr. McKay's post in Handling escrow trades was marked as the answer   
    receivedOfferChanged or sentOfferChanged will be emitted with the offer's new state being Accepted when the trade comes out of escrow.
  3. Dr. McKay's post in no Typescript module for Visual Studio Code was marked as the answer   
    I have no plans to create a TypeScript definition.
  4. Dr. McKay's post in getServerList was marked as the answer   
    As of v4.0.0, the first argument to all callbacks is err. See the release notes here.
  5. Dr. McKay's post in How to get an array of the users whom relationship is 2 (Waiting for friend request to accept)? was marked as the answer   
    client.myFriends is useless before friendsList is emitted.
  6. Dr. McKay's post in I've got a few questions (3) was marked as the answer   
    Inviting people to a Steam lobby is not currently possible.
    friendOrChatMessage is deprecated. Please try using the new SteamChatRoomClient stuff. That said, this shouldn't happen so I've made an issue to look at later.
    Yes, but it's pretty difficult.
  7. Dr. McKay's post in Notable changes in v4.X was marked as the answer   
    https://github.com/DoctorMcKay/node-steam-user/releases/tag/v4.0.0
  8. Dr. McKay's post in Check if key is valid client.redeemKey was marked as the answer   
    client.on("friendMessage", function (steamID, message) {
    if (steamID == AdminID && message.indexOf('!key') == 0) {
    var GetKey = message.replace('!key ', '');
    client.redeemKey(GetKey, function (err) {
    if (err) {
    // key not activated
    } else {
    client.chatMessage(steamID, "Key activated: " + GetKey);
    }
    });
    }
    });
  9. Dr. McKay's post in Assigning proxy and new local address and port, client still showing public IP as my own. was marked as the answer   
    173.208.103.160 is not an IP address assigned to any interface on your system. Is that a proxy IP? If so, just use the proxy option and don't set localAddress.
     
     
    Please read the v4 release notes.
  10. Dr. McKay's post in How do you get rich presence data? was marked as the answer   
    It's in the user event in steam-user.
  11. Dr. McKay's post in [v4] Access purchaseResultDetails on key redeeming error was marked as the answer   
    Promise limitations prevent any arguments besides err from being sent to the callback if an error occurred. If you update to v4.4.3, you'll be able to access this data via the Error object instead, using err.purchaseResultDetails and err.packageList.
  12. Dr. McKay's post in Trade Notifications Messages don't get cleared when... was marked as the answer   
    No, there is no way to suppress those messages from coming in when you receive a trade offer. Eventually I'm sure I'll add a method you can use to mark those as read, but for the time being there's no way to clear them in a bot.
  13. Dr. McKay's post in Error: Must be logged in before trying to do anything with confirmations was marked as the answer   
    That's not how you use steam-client; you're probably looking to use steam-user
    Don't use community.startConfirmationChecker. Per the docs, no support will be provided for code that uses confirmation polling.
  14. Dr. McKay's post in How to add only 1 item type to offer was marked as the answer   
    let tag;
    if ((tag = item.getTag('item_class')) && tag.internal_name == 'item_class_2') { ... }
  15. Dr. McKay's post in Is there a way to accept a certain trade offer through message with its offerid? was marked as the answer   
    You'll need to retrieve the offer first.
  16. Dr. McKay's post in Always get asked for steamGuard was marked as the answer   
    I was unable to reproduce this on the v3 branch, but there is indeed a bug in v4 that prevents sentry files from being appropriately confirmed with Steam. It will be fixed in beta 5 to be published later today, but for the time being if you delete your sentry file and login with v3 and provide an email code, v4 should then work.
  17. Dr. McKay's post in EconItems: distinguish between Trading Card, Booster, Gems, Emote and Background was marked as the answer   
    That looks correct enough, though you should probably also check the tag's category.
  18. Dr. McKay's post in steam command fix was marked as the answer   
    Supported in v4 beta 2.
  19. Dr. McKay's post in Adding a small delay was marked as the answer   
    I really don't mind necroing on this forum.
     
    You definitely need to put the confirmation acceptance inside the callback to accept, but within that callback it's not a bad idea to add a short delay. Use setTimeout for this.
  20. Dr. McKay's post in Error: This trade offer is no longer valid. was marked as the answer   
    You're firing off getUserDetails and accept at the same time. The accept request is probably getting processed by Steam before the details one, and thus Steam no longer believes the offer is active when the details request gets processed.
  21. Dr. McKay's post in How to change ERR language? was marked as the answer   
    The error language is probably controlled by your Steam account language.
  22. Dr. McKay's post in fix for handlers was marked as the answer   
    Should be fixed in the latest commit.
     
    Remember that the v4 branch is still pre-alpha. There are going to be bugs.
  23. Dr. McKay's post in 'Error: Cannot accept an unsent offer' for a received offer was marked as the answer   
    You're accepting offers very wrongly. First, remove the offer.accept(...) around your call to your own accept function. Second, passing offer.accept to setTimeout like that will cause problems because the this reference is lost. For example:
    function TestObj(name) { this.name = name; } TestObj.prototype.printThis = function() { console.log(this); }; let obj = new TestObj('foobar'); obj.printThis(); setTimeout(obj.printThis, 500); Prints this:
    TestObj { name: 'foobar' } undefined The reason this happens is because this is set to the reference of the object on which the method was called. So when you call obj.printThis(), the this reference is to obj. But when you pass obj.printThis to setTimeout, what setTimeout sees is something like:
    function setTimeout(callback, delay) { wait(delay); callback(); } As you can see, when callback is called (which is obj.printThis in this case), there is no object reference on which it's called, so this is undefined.
     
    If you want to pass offer.accept to setTimeout like that, you'll need to bind it like this: setTimeout(offer.accept.bind(offer), delay)
  24. Dr. McKay's post in Bot's Account User Data was marked as the answer   
    https://github.com/DoctorMcKay/node-steam-user#datadirectory
  25. Dr. McKay's post in Donation Only Bot Without 2FA was marked as the answer   
    Just remove the whole startConfirmationChecker line. There's no need to confirm anything if you're never losing items.
×
×
  • Create New...