sNIP Posted October 9, 2019 Report Posted October 9, 2019 (edited) const manager = new TradeOfferManager({ steam: client, community: community, language: "en"}); manager.on("sentOfferChanged ", function (offer,oldState) { console.log(`Sent offer changed:` + offer.state);}); sentOfferChanged doesnt emit, the only time it emits something is when I send an offer that needs to be confirmed (ETradeOfferState = 9). Do I have to call doPoll() manually or Iam missing something? Edited October 9, 2019 by sNIP Quote
Dr. McKay Posted October 9, 2019 Report Posted October 9, 2019 There's no reason why it shouldn't emit, provided you've set your cookies properly. You're probably doing something wrong. Quote
sNIP Posted October 10, 2019 Author Report Posted October 10, 2019 (edited) const client = new SteamUser();const community = new SteamCommunity();const manager = new TradeOfferManager({ steam: client, community: community, language: "en",});const logInOptions = { accountName: logInConfig.accountName, password: logInConfig.password, twoFactorCode: SteamTotp.generateAuthCode(logInConfig.sharedSecret)};client.logOn(logInOptions);client.on("loggedOn", () => { console.log("logged on"); client.setPersona(SteamUser.EPersonaState.Online); client.gamesPlayed(730); client.webLogOn();});client.on("webSession", (sid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies);});Really looking forward for helpedit: Also thiscommunity.on('sessionExpired', function(err) { if (err) { console.log('Session Expired: ' + err); } if (client.steamID) { client.webLogOn(); console.log('called weblogon: ' + thisId); } else { client.logOn(logOnOptions); console.log('called logon'); }});Edit:2 I do not receive ANY emits now from sentOfferChanged, can confirm that client.on("webSession", (sid, cookies) => { is called Edited October 10, 2019 by sNIP Quote
Dr. McKay Posted October 10, 2019 Report Posted October 10, 2019 There's no need to call webLogOn inside of a loggedOn event callback. A web logon happens automatically when you first connect. If you add manager.on('debug', console.log) you might get some helpful output. Quote
sNIP Posted October 10, 2019 Author Report Posted October 10, 2019 There's no need to call webLogOn inside of a loggedOn event callback. A web logon happens automatically when you first connect. If you add manager.on('debug', console.log) you might get some helpful output.Yep I removed it, but still doesnt work, will try to 'debug' and see what happens Quote
sNIP Posted October 10, 2019 Author Report Posted October 10, 2019 (edited) It seems that everything is ok from the manager debug, it prints "doing trade offer poll since *somenumber*" and 1/5 of the times or something "trade offer poll since 1(full update)", but no emits. EDIT:I just love javascript and my stupiditymanager.on("sentOfferChanged " I had this space floating around, thanks anyways! Edited October 10, 2019 by sNIP Quote
Dr. McKay Posted October 10, 2019 Report Posted October 10, 2019 Oops! Totally missed that too. 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.