Op1x3r Posted June 5, 2020 Report Share Posted June 5, 2020 Hello, I noticed that sometimes the bot disconnects and when a new offer comes it says "err: not logged in". How do I make it re-login automatically? Quote Link to comment Share on other sites More sharing options...
vrtgn Posted June 5, 2020 Report Share Posted June 5, 2020 client.webLogOn(); Sometimes your session can expire, so you can use this event: community.on('sessionExpired', err => client.webLogOn()); Quote Link to comment Share on other sites More sharing options...
Op1x3r Posted June 5, 2020 Author Report Share Posted June 5, 2020 (edited) 23 minutes ago, vrtgn said: client.webLogOn(); Sometimes your session can expire, so you can use this event: community.on('sessionExpired', err => client.webLogOn()); I login like this: client.on('loggedOn', () => { console.log('Logged on'); client.setPersona(SteamUser.EPersonaState.Online); client.gamesPlayed(440); }); var apiKey; var webSession; client.on('webSession',(sid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); community.startConfirmationChecker(10000, config.bot.identitySecret); getSteamAPIKey({ sessionID: sid, webCookie: cookies }, function(err, apikey) { apiKey = apikey; }); webSession = true; }); Will client.webLogOn() trigger the webSession event? Edited June 5, 2020 by Op1x3r Quote Link to comment Share on other sites More sharing options...
vrtgn Posted June 5, 2020 Report Share Posted June 5, 2020 Yes Op1x3r 1 Quote Link to comment Share on other sites More sharing options...
Op1x3r Posted June 6, 2020 Author Report Share Posted June 6, 2020 7 hours ago, vrtgn said: Yes Thanks! Quote Link to comment Share on other sites More sharing options...
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.