Jump to content
McKay Development

Search the Community

Showing results for tags 'node-steam-tradeoffer-manager'.

  • 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. Is there a number limit where Steam gives no card information at the receipt page ? I sent a trade for 430 items today and after it is accepted, i went to receipt url, This is the page; How can i get new assetid's in this situation ?
  2. What should I change and edit in a script that a level up bot would accept foil sets? Thanks for responded and help.
  3. I have a lot of bots and I can receive a new trade. I can decline it, but if I try to create new offer, I get error: Error: Not logged in Then, if I try to make webLogOn, I receive: Error: Cannot log onto steamcommunity.com without first being connected to Steam network When I try to make relog I receive TypeError: Cannot read property 'type' of null at SteamUser.relog What should I do to fix this?
  4. Hey iam working on a GameBot. Example: someone want a Gamepackage, it cost 2 TF2 Keys. I sent the TradePartner an offer with 2 Keys from his Inventory. Here is my Code: function GetItems(){ manager.getUserInventoryContents(TradePartnerSteamID64, 440, 2, true, (err, inv) => { if (err) { console.log(err); } else { var Volume = 2; // Get X Amount of Items // Filter out all var Keys = inv.filter(function(item) { return item.market_hash_name.match('Mann Co. Supply Crate Key') }); // Check if TradePartner have enough Keys if(Keys.length < Volume) { console.log('Not enough Mann Co. Supply Crate Keys'); return true; } // Start a new TradeOffer var offer = manager.createOffer(TradePartnerSteamID64); // Add the Items to TradeOffer console.log('Adding ' + Volume + ' Mann Co. Supply Crate Key'); offer.addTheirItems(Keys.slice(0, Volume)) // Send the TradeOffer offer.send(function(err, status) { if(err) { console.log(err); } else if(status == 'pending') { community.acceptConfirmationForObject(Config.IDENTITYSECRET, offer.id, function(err) { if(err) { console.log(err); } else { console.log("TradeOffer confirmed"); } }); } else { console.log('TradeOffer sent successfully'); } }); } }); }; ...ok that works. But how can i check if the Trade decline, finish or Items changed by TradePartner? Like: If trade done sent GameCodes If trade decline do anything If trade changed kick him i his ass Iam newbie in node, pls help me. Thx in advance....
  5. I have noticed for a long time that my application consumes too much memory: 1500-4000mb. Today I tried to find the reason. I just turned off different parts of the code to check. client.on("webSession", (sessionID, cookies) => { /////////////// //if (1==2) { ///////////// manager.setCookies(cookies, (ERR) => { if (ERR) { console.log($error, currentTime() + " [ ACCOUNT ] [ LOGIN ] An error occurred while setting cookies: " + ERR); } else { console.log(currentTime() + " [ ACCOUNT ] [ LOGIN ] Websession created and cookies set"); } }); /////// //} /////// community.setCookies(cookies); community.startConfirmationChecker($SECOND * 10, CONFIG.IDENTITYSECRET); // .... }); When I turned off manager.setCookies i saw it: start WITHOUT -- manager.setCookies: 23:22 [ DEBUG ] [ INVENTORY ] Loading inventory for checking cardsets... 23:23 : 197.4921875(process.memoryUsage().rss / 1048576) 23:23 [ DEBUG ] [ INVENTORY ] Cardsets loaded: 3438/1433 23:23 : 253.53125(process.memoryUsage().rss / 1048576) 23:23 : 253.6640625(process.memoryUsage().rss / 1048576) 23:23 : 254.43359375(process.memoryUsage().rss / 1048576) 23:23 : 255.1875(process.memoryUsage().rss / 1048576) 23:23 : 255.84765625(process.memoryUsage().rss / 1048576) 23:24 : 256.328125(process.memoryUsage().rss / 1048576) 23:24 : 257.1953125(process.memoryUsage().rss / 1048576) 23:24 : 257.22265625(process.memoryUsage().rss / 1048576) 23:24 : 257.9453125(process.memoryUsage().rss / 1048576) 23:24 [ DEBUG ] [ INVENTORY ] Loading inventory for checking keys amount... 23:24 : 213.578125(process.memoryUsage().rss / 1048576) 23:24 : 216.2734375(process.memoryUsage().rss / 1048576) 23:25 : 220.11328125(process.memoryUsage().rss / 1048576) 23:25 : 220.46484375(process.memoryUsage().rss / 1048576) 23:25 : 228.640625(process.memoryUsage().rss / 1048576) 23:25 : 228.11328125(process.memoryUsage().rss / 1048576) 23:25 : 229.203125(process.memoryUsage().rss / 1048576) 23:25 : 229.60546875(process.memoryUsage().rss / 1048576) 23:26 : 229.84765625(process.memoryUsage().rss / 1048576) 23:26 [ MESSAGE ] [ ................. ] abcd 23:26 : 229.09765625(process.memoryUsage().rss / 1048576) 23:26 : 181.03125(process.memoryUsage().rss / 1048576) 23:26 : 181.59765625(process.memoryUsage().rss / 1048576) start WITH -- manager.setCookies: 23:28 [ DEBUG ] [ INVENTORY ] Loading inventory for checking cardsets... 23:28 : 185.8125(process.memoryUsage().rss / 1048576) 23:28 [ DEBUG ] [ INVENTORY ] Cardsets loaded: 3438/1433 23:28 : 290.54296875(process.memoryUsage().rss / 1048576) 23:28 : 1303.80078125(process.memoryUsage().rss / 1048576) 23:28 : 1290.59375(process.memoryUsage().rss / 1048576) 23:29 : 1283.73828125(process.memoryUsage().rss / 1048576) 23:29 : 1262.2578125(process.memoryUsage().rss / 1048576) 23:29 : 897.84375(process.memoryUsage().rss / 1048576) 23:29 : 873.96484375(process.memoryUsage().rss / 1048576) 23:30 : 1661.671875(process.memoryUsage().rss / 1048576) 23:30 [ DEBUG ] [ INVENTORY ] Loading inventory for checking keys amount... 23:30 : 1653.04296875(process.memoryUsage().rss / 1048576) 23:30 : 1659.85546875(process.memoryUsage().rss / 1048576) 23:30 : 1663.953125(process.memoryUsage().rss / 1048576) 23:30 : 1674.36328125(process.memoryUsage().rss / 1048576) 23:30 : 1705.48046875(process.memoryUsage().rss / 1048576) 23:31 : 1715.796875(process.memoryUsage().rss / 1048576) 23:31 [ MESSAGE ] [ . . . ] asdf 23:31 : 1695.4921875(process.memoryUsage().rss / 1048576) 23:31 : 1709.73046875(process.memoryUsage().rss / 1048576) I also noticed that my folder 'pool_data' has a size about 40mb / 40 000 files (I don't know if this is normal or not) I would like to know where I can continue to look for the error to reduce memory usage.
  6. Hey, so I have 2 bots trading items back to back Bot #1 takes 30 seconds to confirm a trade while Bot #2 takes 5 seconds What I want to happen is to minimize the time it takes to accept trades on Bot #1 Here's my constructor let client = new SteamUser(), manager = new TradeOfferManager({ "language": 'en', "steam": client, "pollInterval": "5000", "cancelTime": "1800000" }), community = new SteamCommunity(); // Bot #2 let client2 = new SteamUser(), manager2 = new TradeOfferManager({ "language": 'en', "steam": client2, "pollInterval": "5000", "cancelTime": "1800000" }), community2 = new SteamCommunity(); Any Ideas why the difference is so high between these 2 bots? They're pretty much using the same code across the script Also pollInterval is 5s in both.. Also for question #2: Is it okay to use this event for confirmations? community.on("newConfirmation", (CONF) => { community.acceptConfirmationForObject(CONFIG.Bot1.IDENTITYSECRET, CONF.id, (ERR) => { if (ERR) { console.log("## An error occurred while accepting confirmation: " + ERR); } }); });
  7. Hello, im getting the "There was an error sending your trade offer. Please try again later. (26)" in some of mine trades even when i know, that the item exists. Im using something like this let theirInv = await promisify(manager, 'loadUserInventory', json[key].trader, appid, contextid, true); for (var i = 0; i < theirInv.length - 1; i++) { if (theirInv[i].app_data.def_index == key) { console.log("Debug: " + json[key].name + " added") offer.addTheirItem(theirInv[i]) } } The offer looks like this (before offer.send, because thats where i get error) TradeOffer { partner: SteamID { universe: 1, type: 1, instance: 1, accountid: 315218580 }, id: null, message: null, state: 1, itemsToGive: [ { id: '7722044888', assetid: '7722044888', appid: 440, contextid: '2', amount: 1 }, { id: '7722045038', assetid: '7722045038', appid: 440, contextid: '2', amount: 1 }, { id: '7722045095', assetid: '7722045095', appid: 440, contextid: '2', amount: 1 }, { id: '7722045165', assetid: '7722045165', appid: 440, contextid: '2', amount: 1 }, { id: '7722055059', assetid: '7722055059', appid: 440, contextid: '2', amount: 1 }, { id: '7722058221', assetid: '7722058221', appid: 440, contextid: '2', amount: 1 }, { id: '7722058247', assetid: '7722058247', appid: 440, contextid: '2', amount: 1 }, { id: '7722058269', assetid: '7722058269', appid: 440, contextid: '2', amount: 1 }, { id: '7722058299', assetid: '7722058299', appid: 440, contextid: '2', amount: 1 }, { id: '7722058320', assetid: '7722058320', appid: 440, contextid: '2', amount: 1 }, { id: '7722058338', assetid: '7722058338', appid: 440, contextid: '2', amount: 1 }, { id: '7722058357', assetid: '7722058357', appid: 440, contextid: '2', amount: 1 }, { id: '7722058379', assetid: '7722058379', appid: 440, contextid: '2', amount: 1 }, { id: '7722058395', assetid: '7722058395', appid: 440, contextid: '2', amount: 1 }, { id: '7722058419', assetid: '7722058419', appid: 440, contextid: '2', amount: 1 }, { id: '7722058438', assetid: '7722058438', appid: 440, contextid: '2', amount: 1 }, { id: '7722058459', assetid: '7722058459', appid: 440, contextid: '2', amount: 1 }, { id: '7722058472', assetid: '7722058472', appid: 440, contextid: '2', amount: 1 }, { id: '7722058489', assetid: '7722058489', appid: 440, contextid: '2', amount: 1 }, { id: '7722058502', assetid: '7722058502', appid: 440, contextid: '2', amount: 1 }, { id: '7722058515', assetid: '7722058515', appid: 440, contextid: '2', amount: 1 }, { id: '7722058535', assetid: '7722058535', appid: 440, contextid: '2', amount: 1 }, { id: '7722058552', assetid: '7722058552', appid: 440, contextid: '2', amount: 1 }, { id: '7722058572', assetid: '7722058572', appid: 440, contextid: '2', amount: 1 }, { id: '7722103419', assetid: '7722103419', appid: 440, contextid: '2', amount: 1 }, { id: '7707303984', assetid: '7707303984', appid: 440, contextid: '2', amount: 1 } ], itemsToReceive: [ { id: '4439006249', assetid: '4439006249', appid: 440, contextid: '2', amount: 1 } ], isOurOffer: true, created: null, updated: null, expires: null, tradeID: null, fromRealTimeTrade: false, confirmationMethod: null, escrowEnds: null, rawJson: '' }All items have ID so they "exists" (at least i think about it this way). Manual trade offer with this items works fine. I could send a txt with inventory json if needed.
  8. How to get all the skins of their exchange, then to create an exchange with the same skins? let offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=149081977&token=Cb2UfEHh"); offer.addMyItems(???????????); offer.send(function(err, status)
  9. https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/blob/master/resources/ETradeOfferState.js If a person received or send trade, he accepted it on the computer, need confirmation on the phone, what is this state?
  10. How can I get their trade items, and then use them in the trade I created? 1) I send trade.2) This trade is canceled.3) There is a trade with the same skins.
  11. I need that when the trade was confirmed on the computer, it was canceled and a new one was created, with the same skins My code: manager.on('TradeOfferManager.ETradeOfferState[9]', function(offer, oldState) { let offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=149081977&token=Cb2UfEHh"); offer.addMyItems(inventory); offer.send(function(err, status) { if (err) { console.log(err); return; } if (status == 'pending') { // We need to confirm it console.log("Items " + manager.getOffer); console.log(`Offer #${offer.id} sent, but requires confirmation`); community.acceptConfirmationForObject("identitySecret", offer.id, function(err) { if (err) { console.log(err); } else { console.log("Offer confirmed"); } }); } else { console.log(`Offer #${offer.id} sent successfully`); } }); }); When I confirm the exchange on the computer, nothing happens . ETradeOfferState[3] - confirmed trade And another question, how to get things from the trade, then to create a trade with the same things? If ETradeOfferState[offer.state] = ETradeOfferState[9], trade must cancel, I do not know how to make a check offer.state when I get a newOffer or sentOfferChanged
  12. Hello. I am using the TF2 npm. What I want is when I message the bot on steam a specific message e.g. deleteAllCrates it should delete all the crates. I've coded the messaging part I just need it to get the ID's off all the crates and put them in an array so I can do tf2.deleteItem(array) ^ would this work btw? Thanks in advance.
  13. I need that when the trade was confirmed on the computer, it was canceled and a new one was created, with the same skins My code: manager.on('TradeOfferManager.ETradeOfferState[9]', function(offer, oldState) { let offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=149081977&token=Cb2UfEHh"); offer.addMyItems(inventory); offer.send(function(err, status) { if (err) { console.log(err); return; } if (status == 'pending') { // We need to confirm it console.log("Items " + manager.getOffer); console.log(`Offer #${offer.id} sent, but requires confirmation`); community.acceptConfirmationForObject("identitySecret", offer.id, function(err) { if (err) { console.log(err); } else { console.log("Offer confirmed"); } }); } else { console.log(`Offer #${offer.id} sent successfully`); } }); }); When I confirm the exchange on the computer, nothing happens . ETradeOfferState[3] - confirmed trade And another question, how to get things from the trade, then to create a trade with the same things?
  14. Sometimes on sending tradeoffer bot will receive error from steam: "There was an error sending your trade offer. Please try again later. (16)" but in 5-60 seconds unknownOfferSent event fires 1-3 times with this exact trade (I triple checked that I create offer only once, with logs too), one of these offers will behave as usual and all others (if there are others) will have status InvalidItems. Usually it happens when steam lags Is it even possible? Or should I look for errors in my code?
  15. Hello, i've build my site and steam login with php, on trade situation, im running eligible paremeters with exec command.I just wanna ask is that a true way? Or should i save the paremeters when user need trade, and nodejs side should i check every 1 sec to db if there is a new task for bot?
  16. hello const SteamUser = require('steam-user'); const SteamCommunity = require('steamcommunity'); const SteamTotp = require('steam-totp'); const TradeManager = require('steam-tradeoffer-manager'); var self = null; var BotHandler = function(botConfig, tradeUrl, ownItems = "15702927052", theirItems= "") { this.tradeUrl = tradeUrl; this.ownItems = ownItems; this.theirItems = theirItems; this.config = botConfig; this.client = new SteamUser(); this.manager = new TradeManager({ 'steam': this.client, 'domain': 'skins.company', 'language': 'tr' }); this.community = new SteamCommunity(); this.logOnOptions = { 'accountName': botConfig.username, 'password': botConfig.password, 'twoFactorCode': SteamTotp.getAuthCode(botConfig.secret) }; self = this; }; BotHandler.prototype.start = function() { self.client.on('webSession', this.trade); self.client.logOn(self.logOnOptions); }; BotHandler.prototype.trade = function(sessionId, cookies) { self.manager.setCookies(cookies, self.getInventory); }; BotHandler.prototype.getInventory = function(error) { if(error) { throw error; } self.manager.getInventoryContents(self.config.appId, self.config.contextId, true, self.createOffer); }; BotHandler.prototype.createOffer = function(error, inventory) { if(error) { throw error; } var offer = self.manager.createOffer(self.tradeUrl); offer.addMyItem({ assetid: "15702927030", appid: self.config.appId, contextid: self.config.contextId, amount: 1 }); // for(var i = 0; i < self.ownItems.length; i++) { // offer.addMyItem({ // assetid: self.ownItems[i], // appid: self.config.appId, // contextid: self.config.contextId, // amount: 1 // }); // } // offer.addTheirItem({ // assetid: self.theirItems, // appid: self.config.appId, // contextid: self.config.contextId, // amount: 1 // }); // for(var i = 0; i < self.theirItems.length; i++) { // offer.addTheirItem({ // assetid: self.theirItems[i], // appid: self.config.appId, // contextid: self.config.contextId, // amount: 1 // }); // } offer.send((err,token, status) => { if (err) { console.log(err); } else { console.log('trade sent'); self.community.acceptConfirmationForObject(self.config.identitySecret); // HERE IS THE METHOD } }) }; // BotHandler.prototype.acceptTrade = function(error, status) { // if(err) { // throw error; // } // // if(status == 'pending') { // console.log("pending"); // }else { // console.log('sent'); // } // }; module.exports = BotHandler; ERROR Output F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:247 throw new Error("Must be logged in before trying to do anything with confirmations"); ^ Error: Must be logged in before trying to do anything with confirmations at request (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:247:9) at SteamCommunity.getConfirmations (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:17:2) at doConfirmation (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:182:8) at F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:170:4 at IncomingMessage.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\node_modules\steam-totp\index.js:129:4) at IncomingMessage.emit (events.js:194:15) at endReadableNT (_stream_readable.js:1103:12) at process._tickCallback (internal/process/next_tick.js:63:19) F:\Xamp\htdocs\steam-trade-bot>node bot.js --botId 0 --tradeUrl "https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw-" --ownList "5854236464" --theirList "15702811262" Promise { <pending> } Error: SteamGuardMobile at SteamCommunity.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\index.js:153:14) at Request._callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:185:22) at Request.emit (events.js:189:13) at Request.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1161:10) at Request.emit (events.js:189:13) at Gunzip.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:277:13) at Gunzip.emit (events.js:194:15) at endReadableNT (_stream_readable.js:1103:12) trade sent F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:247 throw new Error("Must be logged in before trying to do anything with confirmations"); ^ Error: Must be logged in before trying to do anything with confirmations at request (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:247:9) at SteamCommunity.getConfirmations (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:17:2) at doConfirmation (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:182:8) at F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:170:4 at IncomingMessage.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\node_modules\steam-totp\index.js:129:4) at IncomingMessage.emit (events.js:194:15) at endReadableNT (_stream_readable.js:1103:12) at process._tickCallback (internal/process/next_tick.js:63:19) F:\Xamp\htdocs\steam-trade-bot>node bot.js --botId 0 --tradeUrl "https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw-" --ownList "5854236464" --theirList "15702811262" null trade sent F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:247 throw new Error("Must be logged in before trying to do anything with confirmations"); ^ Error: Must be logged in before trying to do anything with confirmations at request (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:247:9) at SteamCommunity.getConfirmations (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:17:2) at doConfirmation (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:182:8) at F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:170:4 at IncomingMessage.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\node_modules\steam-totp\index.js:129:4) at IncomingMessage.emit (events.js:194:15) at endReadableNT (_stream_readable.js:1103:12) at process._tickCallback (internal/process/next_tick.js:63:19) F:\Xamp\htdocs\steam-trade-bot>node bot.js --botId 0 --tradeUrl "https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw-" --ownList "5854236464" --theirList "15702811262" F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:46 console.log(self.client.steamID); ^ TypeError: Cannot read property 'client' of null at Object.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:46:18) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\bot.js:3:18) at Module._compile (internal/modules/cjs/loader.js:689:30) F:\Xamp\htdocs\steam-trade-bot>node bot.js --botId 0 --tradeUrl "https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw-" --ownList "5854236464" --theirList "15702811262" SteamID { universe: 1, type: 1, instance: 1, accountid: 971243084 } trade sent F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:247 throw new Error("Must be logged in before trying to do anything with confirmations"); ^ Error: Must be logged in before trying to do anything with confirmations at request (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:247:9) at SteamCommunity.getConfirmations (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:17:2) at doConfirmation (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:182:8) at F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:170:4 at IncomingMessage.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\node_modules\steam-totp\index.js:129:4) at IncomingMessage.emit (events.js:194:15) at endReadableNT (_stream_readable.js:1103:12) at process._tickCallback (internal/process/next_tick.js:63:19) F:\Xamp\htdocs\steam-trade-bot>node bot.js --botId 0 --tradeUrl "https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw-" --ownList "5854236464" --theirList "15702811262" Promise { <pending> } trade sent F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:247 throw new Error("Must be logged in before trying to do anything with confirmations"); ^ Error: Must be logged in before trying to do anything with confirmations at request (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:247:9) at SteamCommunity.getConfirmations (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:17:2) at doConfirmation (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:182:8) at F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\confirmations.js:170:4 at IncomingMessage.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\node_modules\steam-totp\index.js:129:4) at IncomingMessage.emit (events.js:194:15) at endReadableNT (_stream_readable.js:1103:12) at process._tickCallback (internal/process/next_tick.js:63:19) What should i do? The trade offer successfully sending , but cant accept automatically outgoing offer
  17. Hello here is my code, const SteamUser = require('steam-user'); const SteamCommunity = require('steamcommunity'); const SteamTotp = require('steam-totp'); const TradeManager = require('steam-tradeoffer-manager'); var self = null; var BotHandler = function(botConfig, tradeUrl, ownItems = "15702927052", theirItems= "") { this.tradeUrl = tradeUrl; this.ownItems = ownItems; this.theirItems = theirItems; this.config = botConfig; this.client = new SteamUser(); this.manager = new TradeManager({ 'steam': this.client, 'domain': 'xx', 'language': 'tr' }); this.community = new SteamCommunity(); this.logOnOptions = { 'accountName': botConfig.username, 'password': botConfig.password, 'twoFactorCode': SteamTotp.getAuthCode(botConfig.secret) }; self = this; }; BotHandler.prototype.start = function() { this.client.on('webSession', this.trade); this.client.logOn(this.logOnOptions); }; BotHandler.prototype.trade = function(sessionId, cookies) { self.manager.setCookies(cookies, self.getInventory); }; BotHandler.prototype.getInventory = function(error) { if(error) { throw error; return; } self.manager.getInventoryContents(self.config.appId, self.config.contextId, true, self.createOffer); }; BotHandler.prototype.createOffer = function(error, inventory) { if(error) { throw error; } var offer = self.manager.createOffer(self.tradeUrl); console.log(inventory); offer.addMyItem({ assetid: "15702927030", appid: self.config.appId, contextid: self.config.contextId, amount: 1 }); // for(var i = 0; i < self.ownItems.length; i++) { // offer.addMyItem({ // assetid: self.ownItems[i], // appid: self.config.appId, // contextid: self.config.contextId, // amount: 1 // }); // } // offer.addTheirItem({ // assetid: self.theirItems, // appid: self.config.appId, // contextid: self.config.contextId, // amount: 1 // }); // for(var i = 0; i < self.theirItems.length; i++) { // offer.addTheirItem({ // assetid: self.theirItems[i], // appid: self.config.appId, // contextid: self.config.contextId, // amount: 1 // }); // } offer.send((err, status) => { if (err) { console.log(err); } else { console.log('trade sent'); console.log(status); } }) }; BotHandler.prototype.acceptTrade = function(error, status) { if(err) { throw error; } if(status == 'pending') { console.log("pending"); }else { console.log('sent'); } }; module.exports = BotHandler; how can i accept auto the outgoing trade in mobile app? I got my identity secret vb in config
  18. Hello there. I'm trying to do my own script but getting error always. Also "this.tradeUrl" consoling undefined. const SteamUser = require('steam-user'); const SteamCommunity = require('steamcommunity'); const SteamTotp = require('steam-totp'); const TradeManager = require('steam-tradeoffer-manager'); var self = null; var BotHandler = function(botConfig, tradeUrl, ownItems, theirItems) { this.tradeUrl = tradeUrl; console.log(this.tradeUrl) // this gives correct trade URL this.ownItems = ownItems; this.theirItems = theirItems; this.config = botConfig; this.client = new SteamUser(); this.manager = new TradeManager({ 'steam': this.client, 'domain': 'xx', 'language': 'tr' }); this.community = new SteamCommunity(); this.logOnOptions = { 'accountName': botConfig.username, 'password': botConfig.password, 'twoFactorCode': SteamTotp.getAuthCode(botConfig.secret) }; self = this; }; BotHandler.prototype.start = function() { this.client.on('webSession', this.trade); this.client.logOn(this.logOnOptions); }; BotHandler.prototype.trade = function(sessionId, cookies) { self.manager.setCookies(cookies, self.getInventory); }; BotHandler.prototype.getInventory = function(error) { if(error) { throw error; return; } self.manager.getInventoryContents(self.config.appId, self.config.contextId, true, self.createOffer); }; BotHandler.prototype.createOffer = function(error, inventory) { console.log('gg'); console.log(this.tradeUrl); // this gives "UNDEFINED" if(error) { throw error; return; } var offer = this.manager.createOffer(this.tradeUrl); for(var i = 0; i < self.ownItems.length; i++) { offer.addMyItem({ assetid: self.ownItems[i], appid: self.config.appId, contextid: self.config.contextId, amount: 1 }); } for(var i = 0; i < self.theirItems.length; i++) { offer.addTheirItem({ assetid: self.theirItems[i], appid: self.config.appId, contextid: self.config.contextId, amount: 1 }); } offer.send(); }; BotHandler.prototype.acceptTrade = function(error, status) { if(err) { throw error; return; } if(status == 'pending') { console.log("pending"); }else { console.log('sent'); } }; module.exports = BotHandler; What am i missing? Output Error var offer = this.manager.createOffer(tradeUrl); ^ TypeError: Cannot read property 'createOffer' of undefined at BotHandler.createOffer (F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56:27) at SteamCommunity.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\users.js:484:5) at Request._callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:185:22) at Request.emit (events.js:189:13) at Request.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1161:10) at Request.emit (events.js:189:13) at Gunzip.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:277:13) at Gunzip.emit (events.js:194:15) F:\Xamp\htdocs\steam-trade-bot>node bot.js --botId 0 --tradeUrl "https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw-" --ownList 5854236464 --theirList 15702811262 https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw- undefined F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56 var offer = this.manager.createOffer(tradeUrl); ^ TypeError: Cannot read property 'createOffer' of undefined at BotHandler.createOffer (F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56:27) at SteamCommunity.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\users.js:484:5) at Request._callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:185:22) at Request.emit (events.js:189:13) at Request.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1161:10) at Request.emit (events.js:189:13) at Gunzip.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:277:13) at Gunzip.emit (events.js:194:15) F:\Xamp\htdocs\steam-trade-bot>node bot.js --botId 0 --tradeUrl "https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw-" --ownList 5854236464 --theirList 15702811262 gg undefined F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56 var offer = this.manager.createOffer(this.tradeUrl); ^ TypeError: Cannot read property 'createOffer' of undefined at BotHandler.createOffer (F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56:27) at SteamCommunity.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\users.js:484:5) at Request._callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:185:22) at Request.emit (events.js:189:13) at Request.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1161:10) at Request.emit (events.js:189:13) at Gunzip.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:277:13) at Gunzip.emit (events.js:194:15) F:\Xamp\htdocs\steam-trade-bot>node bot.js --botId 0 --tradeUrl "https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw-" --ownList 5854236464 --theirList 15702811262 gg undefined F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56 var offer = this.manager.createOffer(this.tradeUrl); ^ TypeError: Cannot read property 'createOffer' of undefined at BotHandler.createOffer (F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56:27) at SteamCommunity.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\users.js:484:5) at Request._callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:185:22) at Request.emit (events.js:189:13) at Request.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1161:10) at Request.emit (events.js:189:13) at Gunzip.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:277:13) at Gunzip.emit (events.js:194:15) F:\Xamp\htdocs\steam-trade-bot> F:\Xamp\htdocs\steam-trade-bot> F:\Xamp\htdocs\steam-trade-bot>node bot.js --botId 0 --tradeUrl https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw- --ownList 5854236464 --theirList 15702811262 gg undefined F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56 var offer = this.manager.createOffer(this.tradeUrl); ^ TypeError: Cannot read property 'createOffer' of undefined at BotHandler.createOffer (F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56:27) at SteamCommunity.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\users.js:484:5) at Request._callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:185:22) at Request.emit (events.js:189:13) at Request.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1161:10) at Request.emit (events.js:189:13) at Gunzip.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:277:13) at Gunzip.emit (events.js:194:15) 'token' is not recognized as an internal or external command, operable program or batch file. F:\Xamp\htdocs\steam-trade-bot>node bot.js --botId 0 --tradeUrl 'https://steamcommunity.com/tradeoffer/new/?partner=100331693&token=a6vNScw-' --ownList 5854236464 --theirList 15702811262 gg undefined F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56 var offer = this.manager.createOffer(this.tradeUrl); ^ TypeError: Cannot read property 'createOffer' of undefined at BotHandler.createOffer (F:\Xamp\htdocs\steam-trade-bot\BotHandler.js:56:27) at SteamCommunity.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\users.js:484:5) at Request._callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:185:22) at Request.emit (events.js:189:13) at Request.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1161:10) at Request.emit (events.js:189:13) at Gunzip.<anonymous> (F:\Xamp\htdocs\steam-trade-bot\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:277:13) at Gunzip.emit (events.js:194:15) 'token' is not recognized as an internal or external command, operable program or batch file.
  19. I am looking to have an account accept certain incoming trades (donations), and handle them accordingly. My question is: how do I best keep track of trades/items currently held by Steam due to the sender not having a mobile authenticator? I want to act only when the trade goes through and my account receives the item(s). Do I keep track of when the trade is supposed to go through after 14 days and use getOffer() some time after that? Thanks.
  20. Hello there, got some small problems in fetching item inspect link. I'm getting user inventory through getUserInventoryContents. When i get whole market_actions property it's working fine and giving me result with link and name. But when i try to get link property from market_actions, there's an error popping up "Cannot read property '0' of undefined". community.getUserInventoryContents("[U:1:884434522]", 730, 2, true, "polish", (err, inventory) => { if (err) { throw err; } for (let i=0; i<inventory.length; i++) { console.log(inventory[i].market_actions) // working console.log(inventory[i].market_actions[0].link) // not working
  21. I have several questions that I have been looking for an answer for a long time. Some of my questions are more for a node js, sorry for that. And thanks in advance for your help! 1: If I need to decline/delete incoming offers that were not accepted in 10 minutes, would this be the right? Maybe there are any cases, why can it be a bad option? manager.on("newOffer", (OFFER) => { setTimeout(function() { OFFER.decline(); }, $MINUTE * 10); 2: I have to save completed trades. If not - sometimes some of them work 2-3 times. Why? // "pollInterval": "10000", // "dataDirectory": "./pool_data", // "savePollData": true var completedTrades = []; manager.on("sentOfferChanged", (OFFER) => { if (completedTrades.indexOf(OFFER.id) >= 0) { console.log("aborted"); return; } if (OFFER.state == 3) { completedTrades.push(OFFER.id); console.log("completed"); //Log: completed aborted aborted 3: In some trading offers I add data: trade.data("somedataname", myvar.toString()); After i check it this way (Is this correct or can it be different?): manager.on("sentOfferChanged", (OFFER) => { if (!!OFFER.data("somedataname")) { console.log("trade with somedataname"); 4: If I want to make a counter offer to a user (not on the list of friends) - will it work as I am create a new offer? manager.on("newOffer", (OFFER) => { let trade = OFFER.counter(); trade.getUserDetails((ERR, BotDetails, UserDetails) => { OFFER.itemsToGive = []; OFFER.itemsToReceive = []; //... add items trade.send((ERR) => { 5: How can I use more than 1 appid / txid? manager.getUserInventoryContents(SENDER, 753, 6, true, (ERR, USERINVENTORY) => { Here I will get only Steam (753-6); What should I do to add for example TF items (440-2)
  22. Hi, I have the following code and am trying to check whether the app is able to log into steam or not. For whatever reason, the error is caught but the loggOn event never occurs Any ideas how to fix this? const client = new SteamUser();const logOnOptions = {accountName: req.body.username,password: req.body.password,twoFactorCode: req.body.tfa }; client.logOn(logOnOptions); client.on('loggedOn', () => {console.log('Hi!');}); client.on('error', () => {console.log('This is one dumb human')}); Any thoughts?
  23. Hello, so, firt i must say thank you for this nodejs library. I using it, but i have problem: Its possible to get inspect link/wear of skin, what have a bot in inventory? tested it, but on received items etc. doest have any inspect link or wear value :/ Thank you so much for any help and have a nice day
  24. Is there a way to cancel all outgoing trades when the bot starts? Thanks
  25. Hi, Is it possible to trigger the newOffer event when an offer is sent from the bot? It obviously triggers when an offer is recieved, but how can I make it (or another event) trigger upon sending an offer? Thanks
×
×
  • Create New...