drdr Posted July 2, 2022 Report Posted July 2, 2022 (edited) Good afternoon again, Doctor. Can you please tell me if steam can give an error when offer.send but still send the trade? (because steam is shit) this.sentOffer = this.manager.createOffer( new TradeOfferManager.SteamID(this.withdraw.steamUser.steamId), this.withdraw.tradeToken.token, ); this.sentOffer.addMyItem({ assetid: this.withdraw.botItem.assetId, appid: this.withdraw.botItem.item.gameId, contextid: 2, }); return new Promise((resolve, reject) => { this.sentOffer.send(async (tradeError, status) => { if (tradeError) { if (this.sentOffer) { this.sentOffer.cancel(); } return reject(tradeError); } if (status === "pending") { telegramBotCreateOffer(this.bot, JSON.stringify(this.sentOffer)); this.community.acceptConfirmationForObject( this.bot.identitySecret, this.sentOffer.id, async err => { if (err) { this.sentOffer.cancel(); await error(err); } }, ); return resolve(); } // here i have to cancel the trade? return reject(); }); }); Edited July 2, 2022 by drdr Quote
Dr. McKay Posted July 2, 2022 Report Posted July 2, 2022 Pretty much anything is possible when Steam is involved. You should be prepared to handle an eventuality where an offer send fails but it ends up going through and being accepted. You can use the unknownOfferSent event to detect when an offer goes through that isn't expected to (i.e. you called offer.send and it succeeded). 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.