PonyExpress Posted July 21, 2022 Report Posted July 21, 2022 (edited) Hello. 1. If the bot receives a trade offer from user. then the bot makes a counteroffer. 2. If the user makes counteroffer, the bot should decline it. So, The bot must decline offers that are counteroffers. How can I implement this? I did not find any data in TradeOffer object that could help me with this. Are there any ideas how I should do this? Maybe the bot should compare time? Llike if newOffer created time = offer with status "Countered" updated time then decline? Exam;e: let trade = new SteamTradeofferManager() let a trade.on("newOffer", (offer) => { if (offer.created == a) { // decline } else { // create counteroffer } }) trade.on("sentOfferChanged", (offer) => { if (offer.state == 4) { a = offer.updated } }) Edited July 21, 2022 by PonyExpress Quote
Dr. McKay Posted July 22, 2022 Report Posted July 22, 2022 I could be wrong, but as far as I remember there's no concrete way to know that an offer is a counter offer. You could possibly check the offer created time and see if it closely matches the updated time of a previous offer sent to that user which has status Countered. 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.