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. After around 50 hours of my server starting I get 'Error: Not Logged In' when trying to send trade offers, I would assume this is because Steam has let my cookies expire (or just killed them because they hate me). Is there a way to detect when the session is no longer valid so I can create a new one? or is it better to refresh them on a timer every hour or so? (I am using node-steamcommunity) Thanks in advance.
  2. I'm writing "npm install steamcommunity" and "npm steam-tradeoffer-manager" in the cmd but i have a little problem: http://i.imgur.com/FMtt4PX.jpg Is that normal? If not, how can i fix that? I'm following charredgrass tutorial. Sorry for bad english.
  3. I'm using getReceivedItems method, but sometimes it keeps returning error. What should I do if bot accepts the offer and I need to know what items bot received but getReceivedItems return error?
  4. Got this little gem today from TradeOffer#getReceivedItems { "id": "5688498100", "owner": "...", "classid": "1618444825", "instanceid": "188530170", "name": "", "pos": 1, "appid": 730, "contextid": "2", "amount": 1, "is_stackable": false, "assetid": "5688498100", "fraudwarnings": [ ], "descriptions": [ ], "owner_descriptions": [ ], "actions": [ ], "owner_actions": [ ], "tags": [ ], "tradable": false, "marketable": false, "commodity": false, "market_tradable_restriction": 0, "market_marketable_restriction": 0 }Has anyone seen this before? How can we identify that the item is malformed? I'm just going to check for a missing market_hash_name since that's all I need, hopefully there is a way to know for sure.
  5. Hello, how do I set bot's persona or gamesPlayed using steamcommunity? I was using steam-user all the time and it was working, but I need to switch to steamcommunity since I need to confirm trade offers. This is my bot login script: var BotID = 1; var Steam = require("steam"); var SteamTotp = require('steam-totp'); var SteamCommunity = require("steamcommunity"); var sclient = new SteamCommunity(); // var ACC_NAME = "username"; var ACC_PSW = "password"; var ACC_SHARED = "shared_secret"; var ACC_IDENTITY = "identity_secret"; var loggingIn = 0; login(); function login() { loggingIn = true; logger.info("Logging into steam..."); sclient.login({ "accountName":ACC_NAME, "password":ACC_PSW, "twoFactorCode": SteamTotp.getAuthCode(ACC_SHARED) }, function(err, sessionID, cookies, steamguard){ loggingIn = false; if(err) return login() //re-login console.log("Bot has logged in."); //====SET PERSONA STATE HERE // }); } sclient.on('sessionExpired',function(err){ if(loggingIn) return; logger.log("Session expired! Trying to re-log"); return login(); }); And I'm not sure how to set state to "Online".
  6. Hello, As you might know, steam has a limit on their API (100,000 calls per day is possible). I tried getting player's inventory just by using a simple xml request to this url: steamcommunity.com/profiles/[iD]/inventory/json/[APP]/2 I set an interval for the requests, and my script crashed after 30 requests (I think) so there must be a maximum requests per minute. However, if players in my website try to access inventory, and I have a lot of players = not good. So my question is, is there a limit of requests using loadInventory (loading bot's inventory) and loadPartnerInventory (loading player's inventory)? Thanks
  7. How low can I put the value on confirmationChecker before Steam starts to limit the requests?
  8. Hi, I recently got this error while restarting my bot: [Error: Access Denied]and before this I had Invalid Password for the steam ip timeout, this has now gone away except this error. There is not a problem with my code as this appeared after restarting a working bot. I expect that this is probably just steams restrictions of logins but I just need reassurance. Regards
  9. Hello! Basically if my bot runs into a getEscrowDuration error it doesn't poll the same offer again unless I restart the bot, not even a manager.doPoll can fix the issue. I know the getEscrowDuration error is on Steam's fault but the manager completely ignores the offer even though it's active once it runs into that error. Here's my code: offer.getEscrowDuration(function(err, daysTheirEscrow, daysMyEscrow) { if(err) { console.log(err); client.webLogOn(); return; } I've only put the client.weblogOn there recently to make sure the bot has the right cookies when it fails to get the escrow duration, but then it doesn't go through the same offer until I restart it. Any help is appreciated! ~ Gergő
  10. Hello, sometimes when my sent offer is accepted, I am calling getReceivedItems method and array in "items" argument is empty. This offer is accepted and items are on bot. Why this is happening sometimes? I think that there is only way to fix this is create recalling of this method if array is empty with something like ~5 iterations.
  11. Hi, how i can get the Partner Steamname? i already get the steamid with this var steamid = offer.partner.getSteamID64(); but i need the steamname of the user :x
  12. Hello, I have a system that sends a tradeoffer to a person and then you have to confirm it via website. When confirming, the bot executes following code: offers.getOffer(m.tradeid,function(err,offer){ if(err) return logger.info("Confirmation error: "+err); switch(offer.state) { case 2: notify(m.client,'Your offer is still pending.'); break; case 1: removeOffer(m.client,m.tradeid,"Invalid trade offer, declining..."); break; case 3: break;//accepted case 4:{ offer.decline(function(err){ //this is wrong, the offer ID is no longer valid if(err) logger.info("There was an error declining bad trade offer: "+err); removeOffer(m.client,m.tradeid,"Do not modify the trades sent by our bots. Trade offer cancelled."); }); break; } case 6: removeOffer(m.client,m.tradeid,"Trade offer cancelled by the bot."); break; case 7: removeOffer(m.client,m.tradeid,"Trade offer cancelled."); break; case 8: removeOffer(m.client,m.tradeid,"Items no longer available."); } });If the offer.state equals 4 (Countered), I should decline the counter-offer, but the ID is no longer valid. How can I get the new ID of a counter-offer?
  13. I rewrote a project of mine and I'm getting "HTTP error 400" when I send a trade. Is there a way for me to see what the URL being requested looks like? My steamID object, token, and items all look fine. https://gyazo.com/c6810441e92be15f49eb43f22ad73e1a Do you know of any silly errors I could be doing? Thanks in advance ,BuSheeZy
  14. Hi. It is available to check before send trade offer that is user have enabled two Factor verification? I dont want escrow trades on my website.
  15. Hi, i have question about data method. If i apply data before accepting offer and if this offer was escrowed, data will be available after 15 days in receivedOfferChanged? I want to save prices and some informations before accept and read it in receivedOfferChanged.
  16. Hello, My bot sometimes gets stuck at "Awaiting mobile confirmation", which is annoying for the customers who want to receive their items. I'm using the example code of steam-tradeoffer-manager on Github. Is there anything to do against this? Kind regards
  17. When a trade is declined it spams trade state code like 2-6 times. Makes DB work shitty. Lol manager.on('sentOfferChanged', function(offer, oldstate){ if(offer.state == TradeOfferManager.ETradeOfferState.Countered){ offer.cancel(function(err){ if(err){ console.log('Unable to cancel offer:' + err.message); } else { db.query("UPDATE `tTradeOffer` SET `sTradeStatus` = 'Cancelled' WHERE `sTradeId` = '"+ offer.id +"'"); console.log('TradeID: '+offer.id+' has been cancelled due to countered!'); io.sockets.in(socket.room).emit('notifyUser', {'msg': 'Trade has been cancelled due to user sending counter offer!', 'status': 'Countered'}); socket.leave(socket.room); } }); } if(offer.state === TradeOfferManager.ETradeOfferState.Declined){ db.query("UPDATE `tTradeOffer` SET `sTradeStatus` = 'Declined' WHERE `sTradeId` = '"+ offer.id +"'"); console.log('TradeID: '+offer.id+' has been declined!'); io.sockets.in(socket.room).emit('notifyUser', {'msg': 'You have declined the trade!', 'status': 'Declined'}); socket.leave(socket.room); } if(offer.state === TradeOfferManager.ETradeOfferState.Accepted){ db.query("UPDATE `tTradeOffer` SET `sTradeStatus` = 'Completed' WHERE `sTradeId` = '"+ offer.id +"'"); db.query("SELECT * FROM `tTradeOffer` WHERE `sTradeId` = '"+offer.id+"'") .on('result', function(data){ db.query("UPDATE `tUserProfile` SET `decCurrentStar` = `decCurrentStar` + "+data.decTradeValue+", `decTotalStar` = `decTotalStar` + "+data.decTradeValue+" WHERE `sUserId` = '"+data.sUserId+"'"); }); console.log('TradeID: '+offer.id+' has been accepted!'); io.sockets.in(socket.room).emit('tradeCompleted', {'msg': 'Trade offer has been processed and Stars added to your wallet!', 'userId': offer.id, 'status': 'Accepted'}); socket.leave(socket.room); } if(offer.state === TradeOfferManager.ETradeOfferState.Canceled){ db.query("UPDATE `tTradeOffer` SET `sTradeStatus` = 'Canceled (Time Out)' WHERE `sTradeId` = '"+ offer.id +"'"); console.log('TradeID: '+offer.id+' has been canceled (Time Out)'); io.sockets.in(socket.room).emit('notifyUser', {'msg' : 'Trade has been cancelled due to it Timing Out!', 'status': 'TimeOut'}); socket.leave(socket.room); } });
  18. Just realized one of the offers is stuck and the confirmation did not go through, is there a way around this as I'm only using SteamCommunity.startConfirmationChecker(12000, s); Would polling solve this issue? is there any other way around it?
  19. Hi there! I have few questiona bout your's node-steam-tradeoffer-manager api. For example, we have 2 steam accounts: user of my website and my bot. 1 step - user want to send his item to my bot and I want to put this into mysql, so user will create trade offer but how to automatically accept it as bot and make sql query? 2 step - second situation, bot have some item and I want to make trade offer for my user. How to do it? And I want to do sql query when the trade will be accepted by user. Best regards for you, Matt.
  20. After some scalability issues with my site I decided to make the most of multiple cores and use Cluster to create many worker processes. It makes no sense to log in and poll on every worker process, so I would like to create and share a single instance of the Tradeoffer Manager between all workers. Is sharing a single instance Tradeoffer Manager the best way to do this? Are there any features of Tradeoffer Manager that would let me use multiple instances on every worker, but not waste resources logging in and polling on each one? If sharing a single instance is the best way to go, then what is a good way to be able to access it from the workers? I would rather use a callback-style interface if possible. Thanks in advance.
  21. unknownOfferSent gets canceled automatically. Have a whitelist of Offer IDs to confirm via steam-community OR cancel confirmations for unknownOfferSent Offers. Have a light mode of the bot that will be memory efficient ? More to be added soon, just out of my mind!
  22. Hey, out of curiosity - my test app crashed a moment ago because of async callback being called twice after steam-user fired `webSession` without calling `webLogOn()`. Any idea why could that happen? When steam-user is requesting new web session on its own, or if/when Steam does that automatically? The account wasn't used in any other way than this application, which was kinda experimental and left alone for ~3 days before that happen. Of course it was bad coded, but I didn't expect `webSession` event being fired more than once. Steam-user version: 3.3.4
  23. Many of my time is spent trying to optimizing the bot to work with this awful service steam provides, Error codes like 16 and Error: ETIMEDOUT are some examples, however it is unknown if the offer is sent or not. Any experience anybody would like to share? Possible solutions? Also, when there's an error and the trade offer is sent means trade.id is true if it's false then surely the offer isn't sent? please check the code below: trade = offers.createOffer(p); trade.send('', t, function(err, status){ if(err){ console.log(err); if(trade.id){ console.log('Offer sent whilst having an error'); //Do something } else { console.log('Offer isn\'t sent'); } } else { //Do something } }
  24. Error polling for trade offers: Error: getaddrinfo ENOTFOUND api.steampowered.com I set PollInterval to -1 but still got this error, is this error caught on the event 'error' ?
×
×
  • Create New...