Jump to content
McKay Development

Search the Community

Showing results for tags 'node.js'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • Releases & Updates
  • Help & Support
    • General
    • Guides
    • node-steam-user
    • node-steamcommunity
    • node-steam-tradeoffer-manager
    • node-steam-session

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Location


Interests

  1. manager.loadUserInventory(steamID,753,2,true,(err,inventory,currencies) => {}) I get "Malformed response" error everytime i try to get the steam inventory and im %100 sure im logged in. I tried same code and getting tf2 and csgo inventories there is no error and i can get inventory successfully but when i try to get steam inventory i always get "Malformed response" error Any Idea how can i fix this ?
  2. Hi, I'm trying to get a user's nickname. I know I'm supposed to use getUserDetails and then getPersonas, but what's the nickname property called?
  3. I've making my bot and I need to check item market hash name within trade offer, but in offer.itemsToGive and offer.itemsToReceive contains only following information: EconItem { appid: 730, contextid: '2', assetid: '13984115215', classid: '310777179', instanceid: '302028390', amount: 1, missing: false, est_usd: '1', id: '13984115215', fraudwarnings: [], descriptions: [], owner_descriptions: [], actions: [], owner_actions: [], market_actions: [], tags: [], tradable: false, marketable: false, commodity: false, market_tradable_restriction: 0, market_marketable_restriction: 0 } So my question is: How to get market_hash_name?
  4. Are there any typescript definitions for this, or is anybody working on it?
  5. let offer = manager.createOffer(steamID); offer.addTheirItems(itemArray); offer.setMessage("Beni kullandığınız için teşekkürler / Thanks for using me") offer.send((err,status) => { }) How can i get a message when the offer successfully accepted?
  6. I am currently working on a bot which requires user access (non-anonymous), and for the purpose of making my own method of retrieving the app code, I have set promptSteamGuardCode to false, however this causes a RateLimitExceeded error when a log on is attempted, the steamGuard event is never emitted. My code calls the logOn function only once, and no other steam-related methods are called multiple times either, here is the logOn snippet: let client = new SteamUser({promptSteamGuardCode: true}); client.logOn({ accountName: username, password: password }); client.on('error', error => callback(error) ); client.on('steamGuard', (domain, callback, lastCodeWrong) => { callback("TokenRequired", domain, callback, lastCodeWrong); }); The function includes further non-steam related code, so that has been omitted. What might be the cause of this?
  7. Hi Doc, My session almost always loses their connection to steam after sometime. Does node-steam-user automatically try to restore that connection? And if not how can I do this myself? Thanks.
  8. Hi! Can you explain few of friend relationship statuses in details?https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EFriendRelationship.js I can`t understand what are: "Blocked", "IgnoredFriend", "SuggestedFriend" and "Max"
  9. I've cookies array like this: [ 'sessionid=7030e64a53d6f7860bc69038', 'steamLogin=76561198447561491%7c%7c3B5AF02B12EC2F367974917BC090EB7F0E6B3B91', 'steamLoginSecure=76561198447561491%7c%7c1CC92BDD67243C7E761681E40E3B8419416AA858' ]I get an error "not logged in" when I try to log in trade offer manager through cookies using setCookies method. I take cookies a minute before using setCookies method Can someone explain why i get an error?
  10. Hi, I'd like to get the lowest price of a Background/Emoteicon on the market. I already figured out how to do that, but for some reason this will ONLY work for anything but Steam items.. Code https://pastebin.com/ujkfYLLa Also, what's the optimal frequency to use this function? Just so I don't spam it too hard.
  11. Hello sir im using php to communicate with my express my problem is the first offer is doing fine but it loops and get an erro on the second one. here is my code. app.post('/test',function(req,res){ r = req.body; items = JSON.parse(r.items); const tradeurl = r.tradeurl; let client = new SteamUser(); let manager = new TradeOfferManager({ "steam": client, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "example.com", // Our domain is example.com "language": "en", "cancelTime":180000 }); let community = new SteamCommunity(); // Steam logon options let logOnOptions = { "accountName": config.username, "password": config.password, "twoFactorCode": SteamTotp.getAuthCode(config.sharedSecret) }; if (FS.existsSync('polldata.json')) { manager.pollData = JSON.parse(FS.readFileSync('polldata.json').toString('utf8')); } client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey); // Get our inventory manager.getInventoryContents(570, 2, true, function(err, inventory) { if (err) { console.log(err); return; } // console.log(inventory); // throw "stop execution"; if (inventory.length == 0) { // Inventory empty console.log("Dota 2 inventory is empty"); return; } console.log("Found " + inventory.length + " Dota 2 items"); // Create and send the offer let offer = manager.createOffer(tradeurl); item = [ { appid: 570, contextid: '2', classid: '645249158', assetid: '13126112943', instanceid: '260036609', amount: 1 } ]; offer.addTheirItems(items); offer.setMessage("Offer: #"+ offer.id); offer.send(function(err, status) { if (err) { console.log(err); return; } if (status == 'pending') { // We need to confirm it console.log(`Offer #${offer.id} sent, but requires confirmation`); community.acceptConfirmationForObject(config.identitySecret, offer.id, function(err) { if (err) { console.log(err); } else { console.log("Offer confirmed"); } }); } else { console.log(`Offer #${offer.id} sent successfully`); } }); }); }); community.setCookies(cookies); }); manager.on('sentOfferChanged', function(offer, oldState) { console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); if (TradeOfferManager.ETradeOfferState[offer.state] == 'Accepted'){ manager.shutdown(); client.logOff(); //process.exit(1); // testing lang return; } }); manager.on('pollData', function(pollData) { FS.writeFileSync('polldata.json', JSON.stringify(pollData)); }); manager.on('sentOfferCanceled',function(reason){ console.log('offer cancelled franz'); manager.shutdown(); client.logOff(); FS.unlink('polldata.json',function(err){ console.log('poll data deleted'); res.send(); }); }); }); the attach file is the result. thank you. hope you guys can help me.
  12. Hello, What is `version` in `json_tradeoffer` from form of tradeoffer? `node-steam-tradeoffer-manager` have set on 4 (https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/blob/master/lib/classes/TradeOffer.js#L297). I checked it while sending offers on steam. If I sent item for friend, `version` is equeal 2, but If I sent offer "item for item" and "nothing for their item", `version` is equeal 3. Any ideas?
  13. Hi, I'm trying to add Full Card Sets in a trade offer. Say, the command to request card sets is !set 10, the bot will send 10 Full Card Sets. I'm not sure how to tell the bot how many Cards make a Full Set. Would I need to use an API or some sort of a database with all the existing sets? I would appreciate any help, thank you!
  14. I working on some open sourced steam card bot, I want to add option to check gems in trade offer, how can I check if trade offer have exactly 4000 gems? array of accepted items: acceptedItems: [ "Chroma 2 Case Key", "Mann Co. Supply Crate Key" ], if (!acceptedItems.includes(offer.itemsToReceive[0].market_hash_name)) { client.chatMessage(offer.partner, 'its not 4000 gems'); return offer.decline(); } can someone help me please?
  15. How do you get the current gameS of you and your friends? (including non-steam game)
  16. My script is an adaptation of examples but stopped randomly once with no input. How do I stop this?
  17. can I disable steam guard thro this script? I'm logged with oAuth, can I disable steam guard?
  18. How can i get Account id in uint32?
  19. I've tried using removeFriend(steamID), but it doesn't work for some odd reason. my code: function purge() { logger.info(allFriends.length); var counter = 0; for (;counter < allFriends.length; counter++) { bots[botid].bot.removeFriend(allFriends[counter]) } logger.info(allFriends[counter]); logger.info(counter); } The first error i got with this was: verbose: [bot] Received message from bot admin: !purge warn: purge info: 76 F:\va\node_modules\steam-user\components\friends.js:55 this._send(SteamUser.EMsg.ClientRemoveFriend, {"friendid": steamID.getSteamID64()}); ^ TypeError: steamID.getSteamID64 is not a function at SteamUser.removeFriend (F:\va\node_modules\steam-user\components\friends.js:55:69) at purge (F:\va\OFFICIAL TRADE BOT\tradebot.js:561:35) at processMessage (F:\va\OFFICIAL TRADE BOT\tradebot.js:685:21) at SteamUser.<anonymous> (F:\va\OFFICIAL TRADE BOT\tradebot.js:846:13) at SteamUser.emit (events.js:180:13) at SteamUser._emitIdEvent (F:\va\node_modules\steam-user\components\utility.js:29:12) at SteamUser._handlers.(anonymous function) (F:\va\node_modules\steam-user\components\chat.js:281:9) at SteamUser._handleMessage (F:\va\node_modules\steam-user\components\messages.js:239:30) at CMClient.emit (events.js:180:13) at CMClient._netMsgReceived (F:\va\node_modules\steam-client\lib\cm_client.js:323:8) So what i did was, go into the module, search for this specific line and changed the line that was causing errors to this: this._send(SteamUser.EMsg.ClientRemoveFriend, {"friendid": steamID}); after that, i didnt get any errors anymore but the method "removeFriend" still doesn't work as it doesn't remove the friends from the friendslist. any ideas? var allFriends is an array containing steam 64 id's of all the friends.
  20. I get this error every so often, I don't know where it's coming from so I don't know how to log in once it happens. This isn't part of the sessionExpired event, as I have this in my code: community.on("sessionExpired", function(err) { console.log("## Session Expired, relogging."); client.logOn(logOnOptions); }); help?
  21. i have the problem, that my bots will stop confirming trades (mobile auth) when they are running for a while. it is completed random, the bots can work for hours sometimes even days without problems and then they will stop to confirming the mobile auth trades. when i shutdown the bots and start them again, then they will confirm the open mobile auth confirmations. so it looks like that the steam servers are not answering or answering with an error or something? is there an debug function, so that i can see an error message why they stop confirming the trades? thank you!
  22. So, I am trying to do some curator stuff with node-steamcommunity. However, for some reason, my simulated requests failed. For example: const formdata = { sessionid: community.getSessionID(), clanid: offer.clanid, appid: offer.appid, action: `accept` }; user.once(`webSession`, () => community.httpRequestPost({ url: `https://store.steampowered.com/curator/${offer.clanid}/admin/ajaxrespondoffer`, form: formdata, // jar: jar, headers: { // ":authority": `store.steampowered.com`, // ":method": `POST`, // ":path": `/curator/${offer.clanid}/admin/ajaxrespondoffer`, // ":scheme": `https`, "Accept": `*/*`, "Accept-Encoding": `gzip, deflate, br`, //"accept-language": `nl-NL,nl;q=0.9,en-US;q=0.8,en;q=0.7`, "Content-Length": `77`, "Content-Type": `application/x-www-form-urlencoded; charset=UTF-8`, "Cookie": community._jar.getCookieString(`https://store.steampowered.com`), "DNT": `1`, "Origin": `https://store.steampowered.com`, "Referer": `https://store.steampowered.com/curator/${offer.clanid}/admin/pending`, //"user-agent": `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36`, "X-Requested-With": `XMLHttpRequest` } }, acceptedCuratorConnectOffer)); user.webLogOn(); I tried to experiment with headers, but that doesn't seem to do anything. Could it be because of https? Or protocol being h2?
  23. can I use webLogOn in 2 different places in same time? can I login account on VPS, and on local PC with other IP, or some session will expire?
×
×
  • Create New...