Jump to content
McKay Development

Recommended Posts

Posted

Hello!
How do I keep the bot logged in? It logs out after a while. 

Do I just use this:

    this.client.setOption('autoRelogin', true);

Appearently you should use webLogOn() in  the code, but how?

Posted (edited)

Ok then I may be in the wrong subforum. The symptom is that the Steam bot gets logged out because the session expires and can't send trades anymore after about 15 hours.

Edited by dawe
Posted

Right, that's a web session, not a client session. When you log in to the client using steam-user and receive a webSession event, that's a web session that's started through the client. Those web sessions expire independently of the client session, and you do need to call webLogOn() occasionally to get a new web session.

Posted

I'm not aware of autoRelogin being broken in any way.

Web sessions are completely independent of CM connections. When steam-user is "connected", that's a CM session. A web session is negotiated through the CM session, but they're entirely separate. Web sessions are never automatically renewed by steam-user; that responsibility falls onto you.

Posted (edited)

Thank you for your help, much appreciated.

 

Would this work: 

this.community.on("sessionExpired", async function (err) {
      if (err) {
        console.log('Session Expired: ' + err);
       
    }
 
      self.client.webLogOn();
      console.log('called weblogon');
   
  });
Edited by dawe

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...