Jump to content
McKay Development

Techload

Member
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

438 profile views

Techload's Achievements

  1. Hello, once again, I am in the need of help. I have been trying for the last day or so to find a way to set a expire time for a single tradeoffer, as my bot will handle different offers, and some need to expire sooner than others. What would be the correct way of doing so? I have tried to modify the expire date without success.
  2. Recently I have been encountereing a issue with my session expireing on one of my bots, and I'm unsure what a correct way of refreshing the session would be, as I have never touched upon this. A function for logging back in, that I figured would work was; community.on('sessionExpired', function (err) { console.log('Session expired.'); if (err) { if (err.message == "Not Logged In") { client.logOn(logOnOptions); return; } else { console.log(err.message); return; } } else { client.logOn(logOnOptions); return; } }); But sadly it does not log the user back in. Would a possible solution be making the client log out first when the session is expiering and then logging back in?
  3. I updated the whole send trade function, and now it's working. Thank you very much for your assistance.
  4. Thanks for the response, I tried uninstalling the current version that I was using, and installed a new one, however, now I'm getting a callback error, stating it's not a function. To be precise, the whole error is as follows: callback(error); ^ TypeError: callback is not a function at Object.exports.makeAnError (mygreatpc\node_modules\steam-tradeoffer-manager\lib\helpers.js:29:4) at SteamCommunity.<anonymous> (mygreatpc\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:490:12) at Request._callback (mygreatpc\node_modules\steam-tradeoffer-manager\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (mygreatpc\node_modules\request\request.js:198:22) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) at Request.<anonymous> (mygreatpc\node_modules\request\request.js:1035:10) at emitOne (events.js:82:20) at Request.emit (events.js:169:7) at IncomingMessage.<anonymous> (mygreatpc\node_modules\request\request.js:962:12)
  5. The code that I'm using is as follows: function makeTrade(){ //Creating the offer, and adding the items. var offer = manager.createOffer(userSteamID); //Creating a offer to their steamid //Adding their items. turn this into addTheirItems later instead. var theirItems = (row[0].userassetid).split(','); for (i = 0; i < theirItems.length; i++) { console.log('Adding: ' + theirItems[i]); offer.addTheirItem({"appid": 730, "contextid": 2, "assetid": theirItems[i]}); } //Adding our itemsm, turn this into addMyItems later instead. var ourItems = (row[0].botassetid).split(','); for (i = 0; i < ourItems.length; i++) { console.log('Adding: ' + ourItems[i]); offer.addMyItem({"appid": 730, "contextid": 2, "assetid": ourItems[i]}); } offer.send("Just attempting to do an offer.", userToken, function(err, status) { if (err) { console.log(err); } else { console.log('Tradeoffer sent'); } }); }); } What I did try, was adding it after the var offer had been made, I did also attempt to add it during a trade processing, but both instances turned up with it being a invalid function.
  6. So, I'm currently working on developing a trading bot for my website, instead of letting someone else do it, as there's only one way to gain experience. So far I have managed to do somewhat of a decent job, it works. But I have come to a point where I would need to do so it does not trade with users that are in escrow. This should preferably be checked during the process of making the offer. I have read, and tried what have been given in this thread - https://dev.doctormckay.com/topic/623-decline-trade-hold/ - but have reached the point of where I'm unsure of what to do, and seeking help from someone who have more knowledge than me with this. So I hope there's someone who's able to help, or point me in the right direction. Thanks in advance.
×
×
  • Create New...