Volodymyr Posted August 6, 2023 Report Posted August 6, 2023 Hi, i got truble withi next methods: community.editProfile() method doesn't work correctly, this method doesn't set profile's summary and real name. manager.on("sentOfferChanged") method doesn't work at all, neither does offer.setMessage() My code: this.community.editProfile({ name: profile.nickname, realName: profile.realName ? profile.realName : "steam user", summary: profile..summary ? profile..summary : "about: ", country: profile.countryCode ? profile.countryCode : "", state: profile.stateCode ? profile.stateCode : "", city: profile.cityID ? profile.cityID : "", customURL: newUrl, background: "", featuredBadge: "", primaryGroup: "", }, (error) => { if (error) { console.log("editProfile", error); } }); async sendOffer(items: CEconItem[], steamID: string, tradeToken: string, message?: string) { const offer = this.manager.createOffer(steamID, tradeToken); offer.addTheirItems(items); offer.setMessage(message ? message : ''); offer.send((err, status) => { if (err) { console.log(err); } console.log(status); if (status === "sent") { SteamBot.updateOne({ SteamLogin: this.botData.SteamLogin }, { $set: { Status: "Trade Pending" } }); } }); this.manager.on("sentOfferChanged", async (offer, oldState) => { console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); if (offer.state == TradeOfferManager.ETradeOfferState.Accepted) { console.log('accepted') } else if (offer.state == TradeOfferManager.ETradeOfferState.Active) { console.log('pending') } else { console.log("offer close") } }) } 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.