Jump to content
McKay Development

Setting persona state


Infrox

Recommended Posts

Hello, how do I set bot's persona or gamesPlayed using steamcommunity?

 

I was using steam-user all the time and it was working, but I need to switch to steamcommunity since I need to confirm trade offers. This is my bot login script:

var BotID = 1;

var Steam = require("steam");
var SteamTotp = require('steam-totp');
var SteamCommunity = require("steamcommunity");

var sclient = new SteamCommunity();


//
var ACC_NAME = "username";
var ACC_PSW = "password";
var ACC_SHARED = "shared_secret";
var ACC_IDENTITY = "identity_secret";

var loggingIn = 0;
login();
function login()
{
	loggingIn = true;
	logger.info("Logging into steam...");
	sclient.login({
		"accountName":ACC_NAME,
		"password":ACC_PSW,
		"twoFactorCode": SteamTotp.getAuthCode(ACC_SHARED)
	},
	function(err, sessionID, cookies, steamguard){
		loggingIn = false;
		if(err) return login() //re-login
		console.log("Bot has logged in.");
		//====SET PERSONA STATE HERE
		
		//
	});
}
sclient.on('sessionExpired',function(err){
	if(loggingIn) return;
	logger.log("Session expired! Trying to re-log");
	return login();
});

And I'm not sure how to set state to "Online".

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