Techload Posted May 12, 2017 Report Posted May 12, 2017 Recently I have been encountereing a issue with my session expireing on one of my bots, and I'm unsure what a correct way of refreshing the session would be, as I have never touched upon this. A function for logging back in, that I figured would work was; community.on('sessionExpired', function (err) { console.log('Session expired.'); if (err) { if (err.message == "Not Logged In") { client.logOn(logOnOptions); return; } else { console.log(err.message); return; } } else { client.logOn(logOnOptions); return; } }); But sadly it does not log the user back in. Would a possible solution be making the client log out first when the session is expiering and then logging back in? Quote
SunriseM Posted May 12, 2017 Report Posted May 12, 2017 Client auto relogs when is disconnected unless you manually disabled it. If you want to renew the session use webLogOn() 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.