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. 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
  2. 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
  3. I have some issues where i cant access my sent offers to cancel them is there anyway to get the list of pending sent offers and cancel them?
  4. Hi, I want my bot to comment on the user's profile upon a successful trade. I tried looking for it here: https://github.com/DoctorMcKay/node-steam-user#events- But I dont find it anywhere! Thanks!
  5. 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!
  6. 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
  7. 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 }
  8. 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)
  9. Hello guys! I want to receive percentage of wear on a skin. http://api.steampowered.com/IEconItems_730/GetPlayerItems/v0001/?key=KEYHERE&SteamID=IDHERE This API doesn't work. If someone knows something I will be very grateful. Thank you!
  10. 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?
  11. Hey there! I've just done a queue that sends trade offers in my bot. Since I have an option to set a rate limiter for this queue (N jobs processed in X seconds), I ask if anybody knows what are the current steam's limit on sending trades? Thanks regardless and sorry if I posted in a wrong forum.
  12. 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
  13. 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 !!!
  14. 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); } });
  15. 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.
  16. 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); });
  17. 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
  18. 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
  19. Could some assist me in disabling my bot's session from ever timing out?
  20. 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?
  21. Hey guys. I have a some problems. Can you help me ? What can i do for this error?
  22. 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?
  23. 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.
  24. 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...