joaolucas89 Posted May 1, 2016 Report Posted May 1, 2016 How to automatically cancel offers if user select my bot items? Quote
Dr. McKay Posted May 1, 2016 Report Posted May 1, 2016 if (offer.itemsToGive.length > 0) { // There are more than 0 items in itemsToGive, so the user requested some items offer.decline(); } Quote
joaolucas89 Posted May 1, 2016 Author Report Posted May 1, 2016 Yes I have something like that. I always decline offers sent by users. manager.on('newOffer', function(offer) { console.log("New offer #" + offer.id + " from " + offer.partner.getSteam3RenderedID()); offer.decline(function(err) { if (err) { console.log(err); return; } console.log('Offer was declined, we dont accept external offers. Only our bots can send an offer :-D'); }); });So, the big question is: When the event "newOffer" is called? Quote
Dr. McKay Posted May 1, 2016 Report Posted May 1, 2016 It's emitted when a new offer is received. Please read the wiki. Quote
joaolucas89 Posted May 2, 2016 Author Report Posted May 2, 2016 So, if only my bot sent offers, I can ignore this event? :-P Quote
joaolucas89 Posted May 3, 2016 Author Report Posted May 3, 2016 And "receivedOfferChanged" too? Right? Quote
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.