Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3388
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Dr. McKay got a reaction from ktfo in Constantly prompted with Steam Guard App Code   
    relog is only meant to be used when you're connected. When error is emitted, that means you got disconnected and SteamUser won't attempt to automatically reconnect. You should be able to just log back on immediately with your login key.
     
    Also, if you want some more descriptive debug output (actual message names and not just numbers), add "debug": true to your constructor options.
  2. Like
    Dr. McKay got a reaction from Catzilla in [v4] Access purchaseResultDetails on key redeeming error   
    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.
  3. Like
    Dr. McKay got a reaction from Jmopel in v4 question   
    Yes, steam-client is obsolete with v4. It's built into steam-user now. And user.setHttpProxy isn't going to work. You should use:
    let user = new SteamUser({ debug: true, singleSentryfile: false, autoRelogin: true, dataDirectory: '/files/clients', httpProxy: proxyUrl });
  4. Like
    Dr. McKay got a reaction from Jmopel in Accept/confirm problem for large offers   
    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.
  5. Like
    Dr. McKay got a reaction from Jmopel in Set API KEY   
    Yes, because ignorant coders will almost definitely start passing API keys that don't belong to the account they're signed into, and start posting GitHub issues asking what's going on.
     
    If you know what you're doing, you can set the apiKey property directly with the correct key, but please make sure you actually know what you're doing.
  6. Like
    Dr. McKay got a reaction from Charlie-81 in How to create a counter to trade offers sent by LevelUp BOT   
    If you're trying to include a unique token with each offer, you're probably best off just generating a random string.
  7. Like
    Dr. McKay got a reaction from PonyExpress in Check what was sent to user   
    If you use the new client.chat.friendMessage method, the callback or promise response will include modified_message, which for a /random message will be something like:
    [random min="1" max="1234" result="1095"][/random] v4.1 will parse this BBCode for you, but until that's released you'll need to parse it yourself.
  8. Like
    Dr. McKay reacted to byteframe in BREAKING CHANGES: steam-user v4 now available on npm   
    huzzahs are in order.
  9. Like
    Dr. McKay got a reaction from roughnecks in How to add only 1 item type to offer   
    You are still getting an array. tags: [ [Object], [Object], [Object], [Object] ] is just how console.log represents an array containing 4 objects.
  10. Like
    Dr. McKay got a reaction from roughnecks in How to add only 1 item type to offer   
    CEconItem has a getTag method. Filter your inventory to only items with the tag you're looking for.
  11. Like
    Dr. McKay got a reaction from roughnecks in EconItems: distinguish between Trading Card, Booster, Gems, Emote and Background   
    That looks correct enough, though you should probably also check the tag's category.
  12. Like
    Dr. McKay got a reaction from roughnecks in Adding a small delay   
    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.
  13. Like
    Dr. McKay got a reaction from SpiTik in steam command fix   
    Supported in v4 beta 2.
  14. Like
    Dr. McKay got a reaction from PonyExpress in BREAKING CHANGES: steam-user v4 now available on npm   
    Beta 2 fixes OS capitalization.
     
    New chat stuff does not yet have docs, but all the methods have jsdoc. SteamChatRoomClient is available as a chat property of your SteamUser instance, e.g. user.chat.sendFriendMessage(steamID, "/flip")
  15. Like
    Dr. McKay got a reaction from tuz1k in Is there a way to confirm listing orders?   
    https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#getconfirmationstime-key-callback
  16. Like
    Dr. McKay reacted to manic in 'Error: Cannot accept an unsent offer' for a received offer   
    It's been working for over 24 hours, thanks.
  17. Like
    Dr. McKay reacted to roughnecks in Bot's Account User Data   
    Thanks, I searched but didn't find it by myself.
  18. Like
    Dr. McKay got a reaction from venfiw in Unable to accept offer: self signed certificate   
    If you're absolutely sure that you want to allow MitM, this should work:
    const Request = require('request'); const SteamCommunity = require('steamcommunity'); let community = new SteamCommunity({ "request": Request.defaults({"rejectUnauthorized": false}) });
  19. Like
    Dr. McKay got a reaction from Kacer in Display link like steam   
    I meant v4.
     
    You could install it directly from Git if you wanted, but I haven't yet written docs for new chat support. The new code is here. To call getGroups for example, you'd do user.chat.getGroups(...)
  20. Like
    Dr. McKay got a reaction from R3v3rso in Get steam keys from a file ?   
    The first problem I see is that you aren't handling the callback to offer.accept, which could fail.
     
    Secondly, you can use the fs module to read from a file. If it's newline-delimited, you could call split("\n") to get an array containing each line in the file.
  21. Like
    Dr. McKay got a reaction from R3v3rso in How to check if the items received are trading cards ?   
    Do something like this:
    let isEachItemATradingCard = theirItems.every((item) => { if (item.appid != 753 || item.contextid != 6) { // AppID is not "Steam" or contextid is not "Community" return false; } let tag = item.getTag('item_class'); if (!tag || tag.internal_name != 'item_class_2') { // Not a trading card                 // You could also check that tag.localized_tag_name == 'Trading Card' but that would only work for English return false; } return true; // all checks passed });
  22. Like
    Dr. McKay got a reaction from lunar in How to get xp of user?   
    I believe the only way to do that is to use the WebAPI.
  23. Like
    Dr. McKay got a reaction from M17ek in Confirmation from another device than Guard?   
    There's a separate secret that's used for confirmations; it's not the same as the one you use to login.
  24. Like
    Dr. McKay got a reaction from M17ek in Confirmation from another device than Guard?   
    If you try to use two different devices to accept confirmations, you tend to miss confirmations on one device or another. It's not a good idea at all.
     
    That said, the error you're getting isn't due to this. It's because your app is either using the wrong secret, or the clock is wrong.
  25. Like
    Dr. McKay got a reaction from cockroach in sentOfferChanged not emitted   
    Can you add this code and provide the output?
    manager.on('debug', console.log);
×
×
  • Create New...