luftwaffe
-
Posts
2 -
Joined
-
Last visited
Posts posted by luftwaffe
-
-
I have x accounts for which I need to create a SteamUser client. I did some quick testing and found that the following code is not working. Any suggestions on why?
var initializeClients = function(data) { var steamuser = require('steam-user'); var steamtotp = require('steam-totp'); var steamtrader = require('steam-tradeoffer-manager'); var client = []; var manager = []; for (var index in data) { var account = data[index]; client[index] = new steamuser(); manager[index] = new TradeOfferManager({ "steam": client[index], "domain": "example.com", "language": "en" }); client[index].logOn({ 'accountName': account.username, 'password': account.password, 'twoFactorCode': totp.generateAuthCode(account.shasec) }); }; }; //x minutes/hours later this function gets called var clientLogOff = function(index) { client[index].logOff(); }
Thanks in advance for any input on this.
Multiple bots (clients) in an array?
in node-steam-user
Posted · Edited by luftwaffe
The code I posted was just to help explain what I wanted to do, it was a quick copy and paste from my working code which while not having the intended effect (read: doing anything) did not throw any errors - sorry for the lack of clarification.
I have by now figured out the problem, I completely forgot that SteamUser does not automatically set the EPersonaState to online upon loggingOn which is why the client[index].gamesPlayed('test') I used to test my code also didn't work.
This code now works shame on me for overseeing something obvious like that.