African Posted May 22, 2017 Report Posted May 22, 2017 Hello, I have been working on a trade bot. I set it up so that it will accept any trade from me(admin) or a donation(not giving items). So far it accepts all donations but is having issues accepting trades from me. I have made sure my SteamID in my config is SteamID64. According to the console output, it says the trade should have been accepted although it hasn't. Here's the console output and heres my code. Feel free to add me on steam if you think you can help. http://steamcommunity.com/id/swagattack835/ 10:02:32 PM - info: New offer #2137947588 from [u:1:108568888]10:02:32 PM - info: User [u:1:108568888] offered a valid trade. Trying to accept offer.10:02:34 PM - info: Offer accepted // Accept any trade offer from the bot administrator, or where we're getting free stuff. if (offer.partner.getSteamID64() === Config.admin || offer.itemsToGive.length === 0) { logger.info("User "+ offer.partner.getSteam3RenderedID() +" offered a valid trade. Trying to accept offer."); offer.accept(function (err) { if (err) { logger.error("Unable to accept offer "+ offer.id +": " + err.message); } else { logger.info("Offer accepted"); } }); Thanks, African Quote
SunriseM Posted May 22, 2017 Report Posted May 22, 2017 (edited) Change it to if (offer.partner.getSteamID64() === Config.admin || offer.itemsToGive.length === 0) { logger.info("User "+ offer.partner.getSteam3RenderedID() +" offered a valid trade. Trying to accept offer."); offer.accept(function (err, status) { if (err) { logger.error("Unable to accept offer "+ offer.id +": " + err.message); } else { logger.info("Offer Status:", status); } }); Check what status outputs. Also remember that if its not a "donation offer" you have to confirm the trade after accepting it Edited May 22, 2017 by SunriseM Quote
African Posted May 22, 2017 Author Report Posted May 22, 2017 Change it to if (offer.partner.getSteamID64() === Config.admin || offer.itemsToGive.length === 0) { logger.info("User "+ offer.partner.getSteam3RenderedID() +" offered a valid trade. Trying to accept offer."); offer.accept(function (err, status) { if (err) { logger.error("Unable to accept offer "+ offer.id +": " + err.message); } else { logger.info("Offer Status:", status); } }); Check what status outputs. Also remember that if its not a "donation offer" you have to confirm the trade after accepting itHow can I confirm it, I started the confirmation checker when the client gets a web session. I am at school right now so I will post the code of how I thought it was confirmed when I get home. Quote
SunriseM Posted May 22, 2017 Report Posted May 22, 2017 (edited) How can I confirm it, I started the confirmation checker when the client gets a web session. I am at school right now so I will post the code of how I thought it was confirmed when I get home.If you started the confirmation correctly, offer should be accepted. Also is recommended that you use acceptConfirmationObject instead of starConfirmationChecker. You can read more about it in the steam-community wiki Edited May 23, 2017 by SunriseM Quote
African Posted May 23, 2017 Author Report Posted May 23, 2017 If you started the confirmation correctly, offer should be accepted. Also is recommended that you use acceptConfirmationObject instead of starConfirmationChecker. You can read more about it in the steam-tradeoffer-manager wikiI found a acceptConfimationForObject method here rather than here. I'll try it out and let you know if it works 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.