live4net Posted May 3, 2018 Report Share Posted May 3, 2018 I need help with receivedOfferChanged. It don't receive offer.id and status. Below is my code and output from console. var botsManager = new BotManager(); botsManager.on('receivedOfferChanged', function(offer, oldState) { console.log('--> STATUS ' + offer.id + ':' + offer.tradeID + ': (OLD:' + oldState + ') TO (NEW:' + offer.state + ')'); });Output: --> STATUS undefined:undefined: (OLD:[object Object]) TO (NEW:undefined) Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 3, 2018 Report Share Posted May 3, 2018 You must have a problem in BotManager somewhere. Quote Link to comment Share on other sites More sharing options...
live4net Posted May 4, 2018 Author Report Share Posted May 4, 2018 (edited) I Just install by: npm i node-steam-bot-manager and don't edit any files from bot manager and trade offer manager. Bot accept offer sucessful, but can't handle receivedOfferChanged Here is all code: var BotManager = require('node-steam-bot-manager'); function InventoryBot() { var botsManager = new BotManager();// Create new instance of the BotManager botsManager.on('receivedOfferChanged', function(offer, oldState) { console.log('--> STATUS:' + offer.id + ':' + offer.tradeID + ': (OLD: ' + oldState + ') TO (NEW:' + offer.state + ')'); }); botsManager.on('newOffer', function (activeAccount, offer) { if (offer.itemsToGive.length == 0 && offer.itemsToReceive.length > 0) { offer.accept(true, function(err, status) { if(err) { console.log('Error: ' + err); console.log('ACCEPTED'); } }); } else { offer.cancel(function (err) { if (err) console.log(err); }); } }); botsManager.infoDebug("Starting Bot Manager"); botsManager.startManager(function (err) { if (err) botsManager.errorDebug("Failed to start Bot Manager"); }); } new InventoryBot(); module.exports = InventoryBot; Bot accepts offer, and send output to console: STATUS:undefined:undefined: (OLD: [object Object]) TO (NEW:undefined) Edited May 4, 2018 by live4net Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 4, 2018 Report Share Posted May 4, 2018 I cannot help you with node-steam-bot-manager. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.