Cyber Posted March 6, 2022 Report Posted March 6, 2022 my bot on the console appears all right for it to start, but it does not stay online and does not show activity status/accepts friend request Quote
Dr. McKay Posted March 7, 2022 Report Posted March 7, 2022 Are you setting your bot's persona status to online? Quote
Cyber Posted March 7, 2022 Author Report Posted March 7, 2022 const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const log = require('../utils/logger'); /* Import Config User */ const config = require('../../config/default.json'); const initClient = (client) => { try { client.logOn({ accountName: config.UserID, password: config.UserPass, twoFactorCode: SteamTotp.generateAuthCode(config.SharedSecret), identity_secret: config.IdentitySecret, shared_secret: config.SharedSecret, rememberPassword: true }) } catch (err) { log.error(err); } }; const restart = (client) => { log.warn('Restarting..') if (!client.steamID) { init(client) } else { client.relog(); } } function webLogin(client) { log.warn('Sessions expired.. Relogging..'); try { client.webLogOn(); } catch (e) { log.error(e); } } const checkClient = (client, community) => { setInterval(() => { community.loggedIn((err, loggedIn) => { if (err) { log.error(err); if ( err.message.indexOf('Socket hang up') > -1 || err.message.indexOf('ESOCKETTIMEDOUT') > -1 ) { webLogin(client); } else { restart(client); } } else if (!loggedIn) { webLogin(client); } else { client.requestRichPresence(SteamUser.EPersonaState.Online); client.gamesPlayed(['Under Maintenance', 730]) } }); }, 1000 * 60 * 15); }; module.exports = { initClient, restart, webLogin, checkClient } so Quote
Dr. McKay Posted March 8, 2022 Report Posted March 8, 2022 requestRichPresence is not the appropriate method to set your persona state to online. Use setPersona instead. Quote
Cyber Posted March 8, 2022 Author Report Posted March 8, 2022 Em 07/03/2022 às 16:46, Dr. McKay disse: It worked, but having the limited account changes anything? like cookies etc Quote
Dr. McKay Posted March 9, 2022 Report Posted March 9, 2022 Having a limited account shouldn't affect activity status or accepting friend requests. Quote
Cyber Posted March 9, 2022 Author Report Posted March 9, 2022 I used a limited account "a new account of mine" and it simply appears that I went online and I'm already logged out and this error appears'' ERROR An error occurred while setting cookies.'' 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.