DLC-EM_exchangebot Posted April 22, 2020 Report Posted April 22, 2020 I noticed my bots go from online(in custom game, using client.gamesPlayed) to offline status after a few hrs. it can still receive messages and recognizes the commands and all, it still functions as it should be even tho it's in offline status it still processes any trades being sent to it I even added a setInterval function for client.gamesPlayed every 1 hr and when it goes offline, I wait for the interval to refresh the client.gamesPlayed part and it doesn't work Quote
Dr. McKay Posted April 22, 2020 Report Posted April 22, 2020 If Steam forgot you were in-game, you wouldn't go offline; you'd go online but not in-game. You probably want to try calling setPersona in your interval instead. That said, I've never experienced this. Can you show the code in your loggedOn event? Quote
DLC-EM_exchangebot Posted April 23, 2020 Author Report Posted April 23, 2020 here sir function login(err) { if (err) { return process.exit(5); } client.on('loggedOn', function() { return client.setPersona(1, account.botDisplayName) } should I replace my client.gamesPlayed in my interval? or should I call setPersona first before calling client.gamesPlayed Quote
Dr. McKay Posted April 23, 2020 Report Posted April 23, 2020 That code as written should work, but: It looks like you'll be adding a new loggedOn listener every time you call login. That's not a problem if login is only called once, but I kind of doubt that's the case from this snippet. That return statement isn't doing anything. It's not necessary to pass your desired persona name every time. If you don't pass any name, Steam won't change your name. It's recommended to reference the enums rather than using the literal value. So in this case, client.setPersona(SteamUser.EPersonaState.Online) Where do you call gamesPlayed()? Quote
DLC-EM_exchangebot Posted April 23, 2020 Author Report Posted April 23, 2020 function login(err) { if (err) { return process.exit(5); } else { client.on('loggedOn', function() { client.setPersona(1, account.botDisplayName) }); client.gamesPlayed("some strings here") } } setInterval(() => { client.gamesPlayed("some strings here") }, 1000 * 60 * 60) Quote
Dr. McKay Posted April 24, 2020 Report Posted April 24, 2020 You should be calling gamesPlayed inside of your loggedOn event. It really shouldn't be necessary to call it from an interval. Quote
DLC-EM_exchangebot Posted April 24, 2020 Author Report Posted April 24, 2020 After a few hrs with using that, my bots don't go offline but one of them keeps crashing with SIGKILL error from forever logs eventhough my server is running at 50% on average 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.