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. I'm having some problems with this - not a big deal but I'd still like to know. Somehow some cards I am receiving in a trade don't have a market_hash_name. As far as I know all cards are marketable, so how is it possible that it doesn't have a market_hash_name? Language is set if that matters Edit: Language is only needed for descriptions right? I'd rather not use it because of all the descriptions it'll load but am not sure if that's actually how it works
  2. When i send a trade offer i want to know when and if it is accepted or declined. Is this possible and how?
  3. I can't seem to find how to get the quality of an item in my/their offer. If I could actually just get all of the offer item variables that would be much appreciated. Thanks!
  4. ERROR "uri": "https://steamcommunity.com/inventory/" + userID. getSteamID64() + "/" + appID + "/" + contextID, ^ TypeError: Cannot read property 'getSteamID64' of null My code function sendRec(steamID, amount){ if (!amount) { var amount = 1; } if (amount == 0) { console.log("User didn't provide a correct amount!"); return; } manager.getUserInventoryContents(steamID, 440, 2, true, function (err, inventory){ if (err) { console.log(err); } else { var scrap = inventory.filter(function (item) { return item.name == "Scrap Metal" }); var refined = inventory.filter(function (item) { return item.name == "Refined Metal" }); var NeededS = amount * 3 var NeededR = amount / 3 if (scrap.length === 0 && refined.length === 0){ client.chatMessage(steamID, "It seems you don't have enough scrap."); return; } else if (amount > NeededS && amount > NeededR) { client.chatMessage(steamID, "You don't have enough scrap. You'll need " + left + " more scrap metals."); return; } else if (amount <= NeededS || amount <= NeededR) { manager.getInventoryContents(440, 2, true, function (err, inventory){ if (err) { console.log(err); } else { var pool = inventory.filter(function (item) { return item.name == "Reclaimed Metal" }); // Let the user know we don't have any if (pool.length === 0) { client.chatMessage(steamID, "I don't have available. Sorry!"); return; } else if (amount > pool.length) { console.log("User asked for more than my backpack."); client.chatMessage(steamID, "I only have " + pool.length + " available. Sorry!"); return; } else if (amount <= pool.length) { // Start a new trade offer var trade = manager.createOffer(steamID); // Add what we should to the current trade console.log("Adding " + amount + " rec."); if (scrap.length < NeededS) { if (Number.isInteger(NeededR) == false){ return; } else { console.log("User doesn't have enough scrap. Sending REF OFFER!!"); //USER ITEMS for (let i = 0; i < NeededR; i++) { trade.addTheirItem(refined[i]); } //BOT ITEMS for (let i = 0; i < amount; i++) { trade.addMyItem(pool[i]); } } } else { console.log("User have enough scrap. Sending SCRAP OFFER!!"); //USER ITEMS for (let i = 0; i < NeededS; i++) { trade.addTheirItem(scrap[i]); } //BOT ITEMS for (let i = 0; i < amount; i++) { trade.addMyItem(pool[i]); } } trade.setMessage("Here is your " + amount + " reclaimed metals"); trade.send(function(err, status) { if (err) { console.log(err); return; } else if (status == 'pending') { console.log("Offer " + trade.id + "have been sent."); community.startConfirmationChecker(15 * 1000, config.identity); client.chatMessage(steamID, "Processing."); client.chatMessage(steamID, "Offer Sent!! Check your trade offer by here https://steamcommunity.com/tradeoffer/" + trade.id + "/."); } }); } } }); } } }) }
  5. node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:173 items.forEach(function(item) { ^ TypeError: items.forEach is not a function Got that error. My code manager.getInventoryContents(440, 2, true, function (err, inventory){ if (err) { console.log(err); } else { // Filter out all the crates var pool = inventory.filter(function (item) { return item.name == "Reclaimed Metal" }); // Let the user know we don't have any if (pool.length === 0) { client.chatMessage(steamID, 'I don\'t have available. Sorry!'); return true; // Give up } // Let the user know we don't have enough else if (amount > pool.length) { console.log('User requested '+amount+' of I only have '+pool.length+' available.'); client.chatMessage(steamID, 'I only have '+pool.length+' crates of series available. Sending a trade offer with all crates of this series.'); } // Start a new trade offer var trade = manager.createOffer(steamID); // Add what we should to the current trade console.log('Adding '+ amount +' rec '); for (let i = 0; i < amount; i++) { trade.addMyItems(pool[i]); } // Send the offer off to Steam with a cute message trade.send(); } });
  6. I have this code to get the items of a specific user, but it should work for every user in the world, so i want to use a variable instead of hardcoding the steamID64 into it, but i just can't get it to work var qqdata = steamID64; // the steamid64 of the user i want to get the inventory from const offer = manager.createOffer + qqdata; offer.getPartnerInventoryContents(730, 2, (err, inventory) => { if (err) { console.log(err); } else { for (var i = 0; i < inventory.length; i++) { setTimeout(function (i) { var name = "'" + inventory[i].market_hash_name + "'"; var image = "'" + inventory[i].icon_url + "'"; var sql = "INSERT INTO `inventorys`.`" + qqdata + "` (name, icon_url) VALUES (" + name + ", " + image + ")"; con.query(sql, function (err) { if (err) { console.log(err); } }); }, 10 * i, i); } } });
  7. Hey guys. I have a some problems. Can you help me ? What can i do for this error?
  8. Hi, so I want to make a bot that will send trade offers with specific items already selected on my website to a user. So the bot will ask for that user items bot will not give any from own inventory. I guess I have to do something with this code but I have not idea what. var offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=157268861&token=N_0bQbD4"); offer.addMyItems(inventory); offer.setMessage("Here, have some items!"); 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("identitySecret", offer.id, function(err) { if (err) { console.log(err); } else { console.log("Offer confirmed"); } }); } else { console.log(`Offer #${offer.id} sent successfully`); } }); So this code, send items from "our" / bot inventory, but I need to send a trade offer with items from a specific user from steam and then he has to accept it.
  9. I used to know a little in this area but i have create my steam bot and forgot how to do it and wandering how to make a trade offer that the bot will generate to send to the user. If there is any documentaion on it Please let me know so i can learn more about this area of the js bot P.S. Thanks in advance
  10. Hey! I'm kinda new to node, and to async programming at all. So I'm sending multiple trade offers with a for loop and Im getting a null offer.id on them. I understood that I have to do a callback but I don't know how. Can you please tell me how to do a callback on the offer.send function. Thanks in advance!
  11. var trade = manager.createOffer(steamid); trade.setMessage('ID:' + drop.id + ', Item:' + drop.market_hash_name + ', Steam ID:' + steamid + ', token:' + tradetoken); trade.setToken(tradetoken); trade.addMyItem(drop); console.log(trade) return: TradeOffer { partner: SteamID { universe: 1, type: 1, instance: 1, accountid: 389643249 }, id: null, message: 'ID:21851, Item:Baseball cap, Steam ID:76561198349908977, token:fGUAlI2j', state: 1, itemsToGive: [ { id: '1234567890123456789', //steamid assetid: '1234567890123456789', //steamid appid: 578080, contextid: '2', amount: 1 } ], itemsToReceive: [], isOurOffer: true, created: null, updated: null, expires: null, tradeID: null, fromRealTimeTrade: false, confirmationMethod: null, escrowEnds: null, rawJson: '' } trade.send(function (err, status) { if (err) { logger.error('Bank sendTrade error trade.send'.blue + err); return; } if (status == "sent" || status == "pending") { ... } }) trade.send return error: There was an error sending your trade offer. Please try again later. (26) This error only for PUBG items. CS GO and Dota send without problems. I noticed that the items have a unique id that is 8 characters longer than VS GP and STEAM How to solve this problem? Thank you in advance for your help
  12. Hi. How can I restrict the input of the trade link if I want to save it for each user via my website? For example, if instead of the trade link I put google.com, if I send a trade, it will give me this error: throw new Error("Unknown SteamID input format \"" + input + "\""); ^ Error: Unknown SteamID input format "google.com"Any idea on how to stop this from happening?
  13. this is my code manager.on('newOffer', (offer) => {console.log(offer.itemsToRecieve.lenght);}); i'm trying to get itemsToRecieve lenght but it logs undefined. I can get itemsToGive lenght but i cant get itemsToRecieve lenght.
  14. Sorry for my English. Today one of the proxy stopped working, I had to buy a new one. I sent the test trade to bot, and it accept trade immediately. The difference with the old ip is very noticeable, before bot accept trades for 20-40 seconds. I suspect that Steam imposes sanctions on the bot for exceeding the number of requests and translates it with a slow mode. Two options come to mind immediately: limit the number of requests or change the proxy once per hour. But I'm not sure that a proxy change will help. In this regard, questions. 1. How to avoid sanctions? 2. What is the limit of requests to not get slow mode? I hope that you can help with information and I can give it to the my programmer.
  15. 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 !!!
  16. I run a couple of Steam accounts, but there are too many requests and I get restrictions. Maybe someone knows if I have several IP addresses on the VDS, how can I start the bot from a certain IP address?
  17. What steam Bot Features Require the steam Api Key and how do i put it into the steam bot
  18. Hello guys, Can we re-check offer after error? manager.on('sentOfferChanged', function(offer, oldState) { if(offer) { console.log('Offer #' + offer.id + ' | oldState: ' + oldState + ' | newState: ' + offer.state); if(offer.isOurOffer && offer.itemsToReceive.length > 0) { if(oldState == 2 && offer.state == 3) { var receivedItems = []; offer.getReceivedItems(true, function(err, items) { if(err) { //RE-CHECK OFFER throw err; return; } // MY CODE } } } } );
  19. Hi guys! I have a question. My bot every time when doing trade offer poll execute 3-10 offer polls for every offer, is it ok? Because i think it should execute only one request. Doing trade offer poll since 1511880049 Doing trade offer poll since 1511880049 Doing trade offer poll since 1 (full update) Doing trade offer poll since 1511880049 Here's my tradeoffermanager init: var manager = new TradeOfferManager({ "steam": client, "domain": "hidden", "language": "ru", "cancelTime": 3600000 });
  20. I have a basic bot i created and would like to know how to beable to separate craftable item from uncraft. and the Documentation on it so i know what i am doing
  21. Hey At the beginning it was working fine, but now it won't accept incoming offer from my main. This is the code:https://pastebin.com/zkQbFSGG how to auto cancel an offer after a moment? Thanks in advance !!!
  22. Hello, Can we reload/recall LoadInventory on error? manager.loadInventory(AppID, ContextID, true, function(err, inv, curr) { if(err) { //Reload here console.log("error while loading inv"); return; } //code });Thanks
  23. The bot sometimes does not inform back on a tradeoffer state change, this can be very annoying, is there any way to prevent this?
×
×
  • Create New...