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. Hello, is there any method to grab buy order info for items in ajax, json? something like this: http://steamcommunity.com/market/priceoverview/?appid=730&currency=3&market_hash_name=StatTrak%E2%84%A2%20M4A1-S%20|%20Hyper%20Beast%20(Minimal%20Wear)
  2. Hey, so I have this function, as follows: checkFriendsAndMessagesWhileOffline() {this.client.on('friendsList', () => {let friendcount = 0;Object.keys(this.client.myFriends).forEach(steamId => {if (this.client.myFriends[steamId] === SteamUser.Steam.EFriendRelationship.RequestRecipient) {logger.info(`Friend request while offline from: ${steamId}`); this.client.addFriend(steamId, (err, name) => {if (err) {return logger.error(`Cannot add friend: ${err}`)}logger.info(`Added ${name} as a friend.`);});this.client.chatMessage(steamId, `Thanks for adding me! Type '!help' for commands.`);};});}); this.client.on('offlineMessages', (count, friends) => {logger.info(`${count} messages from ${friends} since your last login.`)});}; Now, above line 5 I want to do something like (pseudo-code) if (this.client.myFriends[steamId] == steamid.isPrivate) { declineFriendship(); } Is there any way to achieve this? Couldn't find anything in the wiki / docs. Many thanks and thanks for all the hard work that went into this project.
  3. I need like a help section on node-steam-tradeoffer-manager,steam-community, steam-totp, and steam-user on where the commands are. Like where should I know where are the command help page. I seem to can't find one in general. I'll really appreciate if someone shows me a link on where it is. Thank you
  4. Hey, Everytime i try to run the bot on my account i get Error: HTTP error 429 https://imgur.com/a/lGiP3 , But when i try to use an other account it works fine, i've searched a lot and most of answers says that i'm making too many requests or my account is limited while my account is not limited (lvl 21) and as i mentioned before that it works when i use an other account, this is a simple code https://pastebin.com/H5Ca7Bp1 when i run it the bot login after a moment it crash . Thanks in advance !!!
  5. Are showcases not supported still? I have a description that auto updates every 5 minutes, and at that 5-minute mark, it removes the showcase. Is there any way to fix this?
  6. Hello guys. I've got a problem which i cant decide by myself.. First problem was that my bot was going offline with no reason, but i decided it And now i got the second problem: After few hours (sometimes days) bot asking for steam guard code. In console it looks like: "Steam Guard Code:". Guys, need your help Thanks. Code: const config = require("./config.js"); const Config = require('config-js'); const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const SteamCommunity = require('steamcommunity'); const TradeofferManager = require('steam-tradeoffer-manager'); const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeofferManager({ steam: client, community: community, language: 'en' // Может быть любой язык }); // Log in to account with config.js const logOnOptions = { "accountName": config.steam.username, "password": config.steam.password, "twoFactorCode": SteamTotp.generateAuthCode(config.steam.twoFactorCode) }; client.logOn(logOnOptions); // After success login client.on('loggedOn', () => { console.log('Bot succesfully authorized!'); client.setPersona(SteamUser.Steam.EPersonaState.Online, config.steam.botname); console.log('Bot status changed to "Online"'); }); // Thats how i solve problem with going offline community.on('sessionExpired', function(err) { if (err) { console.log('sessionExpired: '+err); } community.stopConfirmationChecker(); if (client.steamID) { client.webLogOn(); } else { client.logOn(logOnOptions); } }); // Thats my way to solve second problem, but it didnt help. client.on("steamGuard", function(domain, callback, lastCodeWrong) { if(lastCodeWrong) { console.log("Last code wrong, try again!"); setTimeout(function() { callback(SteamTotp.getAuthCode(config.steam.twoFactorCode)); }, 30000); } });
  7. Hi, my name is Thanh. Did anybody find the same problems as mine : - I'm using expressjs to run my bot service. - There's a big problem when running the service that the server's memory is increased each time when the bot RECEIVE the items and it is not decreased. So when the memory reach up to 1.4Gbs or a little bit more, the service crashed (Turn Off). - Especially the memory is not increased a lot when SENDING items. How can i solve this problems? Any advice is good for me. Thank you for your time.
  8. I have been working on a tradelog code and i need to get the (offer) from the trade when it processes the trade i dont know the correct way to export the offer from manager.on('newOffer', (offer) => { processOffer(offer); });
  9. Hey there, I am creating a shop which users can deposit and withdraw from. When any users withdraw from the shop within the same ~5 minutes, I just get this error: { Error: The request is a duplicate and the action has already occurred in the past, ignored this time} This is caused when I call getInventoryContents, why is this? Any reason why this is in particular? How can I prevent this? Many thanks, Luca
  10. Guest

    post comment

    Hello For what reasons can I get this error? The settings on this account do not allow you to add comments. through the browser, I can send a message, and through the library I can not profile not private , open wall , but i cant leave comment
  11. hi i need to get all active sent offers manager.on('offerList', function(ActiveOnly,sent,received) { resp.send(sent); }); bot this get all sent items
  12. Could some assist me in disabling my bot's session from ever timing out?
  13. I got some questions: 1. Should i update the cookies? 2. When should i do it? 3. How can i do it?
  14. Hello it's possible to use proxy ip to bind localAddress for steamcommunity, or i can use proxy only for request? var steam = new SteamCommunity({ "localAddress": myProxy, "request": myProxy, });
  15. EDIT: welp thats slightly embarrassing, seems I had a facepalm moment and mixed myself up, was looking at the steamcommunity when I indeed wanted steam-user, and tada there is the functionality I needed right there in my stupid face. My idea is to use the nicknames to make notes and keep track of basic information about people who have interacted with my bot, I realize I could setup some other kind of logging for this, but I would much rather have this information easily visible within steam its self when I login via web and look at the friendslist. [ex https://i.imgur.com/Ns59h2V.png and https://i.imgur.com/ibDUyuj.png] I looked around and didn't seem to find much about it.. But is there currently any functionality to read and set nicknames for people?
  16. getExchangeDetails wouldnt work because my trade apparently didn't have a tradeID set. I couldn't find tradeID being set anywhere in TradeOffer.js's code, and it probably isn't meant to be TradeOffer.id either because that's also being checked for. Any ideas?
  17. Hey guys. I have a some problems. Can you help me ? What can i do for this error?
  18. Hello, can somebody point me way how to sell all steam cards for fixed price? (I have like 20,000 cards from same game, every card 0,03€) I found this: https://dev.doctormckay.com/topic/287-automatic-market-seller/?do=findComment&comment=746 but I don't really know how to use it Greetings.
  19. Their descriptions say that Steam uses the larger value between you and the other user - would this mean that if either the bot or the trade partner have a trade cooldown that both of the escrowDays values will be the same amount?
  20. Is it possible to post a comment in a group ?
  21. Hello! I'm trying to send automatic offers. I have two functions for doing this: One for the ones I want to send and other to send counter offers. The first one works perfect (Thanks again for helping me with that), then I decided to copy-paste that for the second and change it a little. But here's what is strange: the couner function can send offers, but can't confirm them because the offer id is always null. Here are the 2 offers objects: TradeOffer { partner: censored, id: '2192436500', message: 'Here's your trade', state: 9, itemsToGive: [ ... ], itemsToReceive: [ ... ], isOurOffer: true, created: 2018-01-21T11:03:44.021Z, updated: 2018-01-21T11:03:44.021Z, expires: 2018-02-04T11:03:44.021Z, tradeID: null, fromRealTimeTrade: false, confirmationMethod: 2, escrowEnds: null, rawJson: '' } And this is the wrong one: TradeOffer { partner: censored, id: null, message: 'That was not the correct price. Here's what I wanted.', state: 1, itemsToGive: [ ... ], itemsToReceive: [ ... ], isOurOffer: true, created: null, updated: null, expires: null, tradeID: null, fromRealTimeTrade: false, confirmationMethod: null, escrowEnds: null, rawJson: '' } Here is the working one: var offer = manager.createOffer(item.trade_route); offer.addMyItems(items_to_send); offer.addTheirItem({"appid": 440, "contextid": 2, "assetid": item.currentID}); offer.setMessage("Here's your trade"); offer.send(function(err, status) { if (err) { console.log(err); return; } console.log(offer); //here's the one I posted above if (status == 'pending') { console.log(`Offer #${offer.id} sent, but requires confirmation`); setTimeout( function(){ community.acceptConfirmationForObject(key, offer.id, function(err) { if (err) { console.log(err); } else { console.log("Offer " + offer.id +" confirmed"); } }); }, 2000 ); } else { console.log(`Offer #${offer.id} sent successfully`); } }); Here's the worng one (counter offer): var offer = manager.createOffer(trade_url); manager.loadUserInventory(user_id, 440, 2, false, function (err, inventory, currencies) { if ('code for validating other things') { offer.addMyItem(...); offer.addTheirItems(items_to_send); offer.setMessage("That was not the correct price. Here's what I wanted."); offer.send(function (err, status) { if (err) { console.log(err); } if (status == 'pending') { console.log(offer) // Here's the one I posted above setTimeout(function () { community.acceptConfirmationForObject(key, offer.id, function (err) { if (err) { console.log(err); } else { console.log("Offer " + offer.id + " confirmed"); } }); }, 4000); } else { console.log(`Offer #${offer.id} sent successfully`); } }); } else { console.log("Validation failed") ... non related code } }); }); Why the second one can't have the offer.id? Any kinf of help would be aprreciated Note: I had to remove the non-related code and coments... sorry if you test it and fails.
  22. For some reason I get RateLimitExceeded if bot frequently add friends. What's the limit on adding friends? Or the problem is not in the limit ?
  23. Apologies if this is an obvious problem. I have a function that is called that gets a user's inventory, and then pipes that array to another function. It looks like this: function getInv(steamID) { community.getUserInventoryContents(steamID, 730, 2, true, 'english', offercase(err, inventory, currencies, totalitems));} And is called like this: getInv(data.steamID) With data.steamID being formatted as { universe: 1, type: 1, instance: 1, accountid: 123456789 } When it's run, it states that "err" is undefined. What's the issue here?
  24. changePassword() takes the e-mail code that gets sent to you as its third argument. It's a catch-22 that I don't understand, though, because the e-mail code doesn't get sent until you call that function. Regardless of whether you add the argument, a prompt comes up and proceeds to *not* use the input and use the argument as the code. What am I missing? Sorry, but I couldn't figure it out looking at the documentation. const User = new SteamUser(); User.logOn({ 'accountName': <username>, 'password': <password> }); User.on('loggedOn', function() { console.log('Successfully logged in'); User.changePassword(<old password>, <new password>, <random string>, function(err) { // how are you supposed to provide the code when it gets activated by the function? console.log(err); }); });
  25. Here is my code: function sendWithdrawTrade(partner, assetid, callback) { var itemsLength =''; connection.query(`SELECT COUNT(*) AS count FROM trade WHERE tradeurl = '${partner}' `, function(err, rows){ var itemsLength = rows[0].count; console.log(rows[0].count + ' items'); setValue(rows[0].count); }); function setValue(value) { itemsLength = value; } const offer = manager.createOffer(partner); manager.getInventoryContents(730, 2, true, (err, inv) => { if (err) { console.log(err); } else { console.log(itemsLength + ' - items length'); for (var i = 0; i < itemsLength; i++){ var parten = `${partner}`; var items = ""; var loop = [i+1]; console.log(loop); connection.query("SELECT itemid FROM trade WHERE tradeurl = '" + partner + "' AND id = '" + loop + "' ", function(err, rows){ if (err) throw err; for (var i = 0; i < rows.length; i++) { var result = rows[i]; var items = result.itemid; setValue2(items); console.log(items); } }); function setValue2(value) { items = value; } //offer.addMyItem({"appid": 730,"contextid": 2,"assetid": items}); } offer.send((err, status) => { if (err) { console.log(err); } else { console.log(`Sent offer. Status: ${status}.`); } }); }; }); } And thats what I get in console: (node:7284) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated. 2 items Got API key: *myapikey* 2 - items length [ 1 ] [ 2 ] Error: Cannot send an empty trade offer at TradeOffer.send (C:\OSPanel\domains\qw.qw\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:282:23) at manager.getInventoryContents (C:\OSPanel\domains\qw.qw\bot.js:179:10) at SteamCommunity.<anonymous> (C:\OSPanel\domains\qw.qw\node_modules\steamcommunity\components\users.js:442:5) at Request._callback (C:\OSPanel\domains\qw.qw\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (C:\OSPanel\domains\qw.qw\node_modules\request\request.js:186:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (C:\OSPanel\domains\qw.qw\node_modules\request\request.js:1163:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) 13335825558 13346525760 I dont understand two things: 1) Why trade send before the "console.log(items);" ? 2) After for loop variable items is empty. How to get this variable from that loop?
×
×
  • Create New...