Search the Community
Showing results for tags 'node-steam-tradeoffer-manager'.
-
Using node-steam-user + node-steamcommunity + node-steam-tradeoffer-manager. At some point this happening: Calling getUserDetails is returning Not logged in. steamCommuniti'es loggedIn returns true, bot is still polling offers and gets new offers, but even after webLogOn cant make getUserDetails reqeust. What can be a problem?
- 1 reply
-
- node.js
- node-steam-tradeoffer-manager
- (and 2 more)
-
My logic is: if the offer, sent by me, is changed, I decline it. I listen for 'sentOfferChanged', and if the offer.state == 4, I want to do offer.decline(). However if I do that, I am getting the errormessage Offer #3065190468 is not active, so it may not be cancelled or declined. Where is my error? Thank you
-
Hellp my bot is very slowly 5minute=20Trades why?
-
I have an issue sending certain trade offers I got a piece of code that trades cards and it appears to work fine.. But sometimes it just says "Creating trade offer for #STEAMID with 102 items to send and 102 items to receive" But nothing ever happens. no trade offer is ever sent. any idea what that could be ? theres no errors or anything
-
Hi, I have 2 things I'm not quite sure about: 1) Currently I use getUserInventoryContents(appid,contextid...etc) to load user's inventory as well as mine. Is it possible to select items from 2 different games in the same trade offer? For example: Their items in trade window will have both CSGO + Steam inventory items 2) How do I go about adding a certain amount of Steam Gems from user's / bot's inventory? I read this article: https://dev.doctormckay.com/topic/332-identifying-steam-items/ and know what asseid,contextid stands for, but I just can't figure out how to find a specific item in an inventory and select Steam gems for example Any help is appreciated!
-
Hi, I need to know, how to send in offer items that user selected on website. I found only code that selects all items: for(i=0; i<itemsArray.length; i++){ const item = theirInv.find((item) => item.assetid ==''+itemsArray[i]); console.log("got item number" + i); offer.addTheirItem(item); } Also I don't understand how to make a webpage where user can select items for trade. User just need to click on his (or bot's) items, then press button for trade. Then somehow nodejs bot must to get trade url, items ids and start trade function. I know that I probably need to use ajax and curl, but just don't understand HOW Thanks
-
I created a donation bot for a community and one of the users is unable to donate to the community's bot because the bot thinks that it has a bundle of trade offers with the user. What can I do to fix this issue? { Error: You have sent too many trade offers, or have too many outstanding trade offers with Jumpman652. Please cancel some before sending more. at Object.exports.makeAnError (/var/www/donationbot/node_modules/steam-tradeoffer-manager/lib/helpers.js:17:12) at SteamCommunity.manager._community.httpRequestPost (/var/www/donationbot/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:349:12) at Request._callback (/var/www/donationbot/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/var/www/donationbot/node_modules/request/request.js:186:22) at Request.emit (events.js:159:13) at Request.<anonymous> (/var/www/donationbot/node_modules/request/request.js:1163:10) at Request.emit (events.js:159:13) at IncomingMessage.<anonymous> (/var/www/donationbot/node_modules/request/request.js:1085:12) at Object.onceWrapper (events.js:254:19) at IncomingMessage.emit (events.js:164:20) at endReadableNT (_stream_readable.js:1054:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9) cause: 'OfferLimitExceeded', eresult: 25 }
-
I am trying to get my CS:GO inventory with getInventoryContents(appid, contextid, tradableOnly, callback). My full code is: "use strict"; 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' }); var steamLogOn = { accountName: 'FancyUsername', password: 'VerySecurePassword', twoFactorCode: SteamTotp.generateAuthCode('Shared_Secret') }; client.logOn(steamLogOn); client.on('loggedOn', () => { console.log('[Steam] Logged in'); }); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); }); manager.getInventoryContents(730, 2, true, (err, inventory) => { if (err) { throw err; } else { console.log(inventory); } }); The error i get is: /var/www/bot/node_modules/steamcommunity/components/users.js:374 "uri": "https://steamcommunity.com/inventory/" + userID.getSteamID64() + "/" + appID + "/" + contextID, ^ TypeError: Cannot read property 'getSteamID64' of null at get (/var/www/bot/node_modules/steamcommunity/components/users.js:374:60) at SteamCommunity.getUserInventoryContents (/var/www/bot/node_modules/steamcommunity/components/users.js:370:2) at TradeOfferManager.getUserInventoryContents (/var/www/bot/node_modules/steam-tradeoffer-manager/lib/index.js:293:18) at TradeOfferManager.getInventoryContents (/var/www/bot/node_modules/steam-tradeoffer-manager/lib/index.js:281:7) at Object.<anonymous> (/var/www/bot/test.js:34:9) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3)
-
Imagine bot go offline after tradeoffer sent. User will accept offer and presumes that he will get some codes into chat. But whoops bot went offline right before user accepted offer. Bot starts 1 minute later and he dont know about any accepted offer when he was offline. How to solve this?
-
When i send a few trades to my bot one of them can be confirmed by mobile and displayed in send trades list, but not listed in bot incom trades. Probably its a steam issue, but maybe this is somehow connected with poll frequency.(Poll time 10s). And this bugged trade will only appear if i send one more trade. Sender acc Bot acc in same time
-
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 !!!
-
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); } });
-
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.
-
Question How to have (offer) in exports
Lonster_Monster posted a topic in node-steam-tradeoffer-manager
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); }); -
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
-
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
-
Could some assist me in disabling my bot's session from ever timing out?
-
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?
-
Hey guys. I have a some problems. Can you help me ? What can i do for this error?
-
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.