Jump to content
McKay Development

How to keep the bot logged in


dawe

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

On 10/23/2024 at 6:09 AM, Dr. McKay said:

Once you're connected, it'll just stay connected unless Steam goes down or your network goes down.

It used to reconnect when steam went down right? I think autoRelogin might be broken currently with steam going down.

 

Does the relog function do the same as the autoRelogin option?
https://github.com/DoctorMcKay/node-steam-user?tab=readme-ov-file#relog

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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...