Jinxed740 Posted April 18, 2017 Report Posted April 18, 2017 Hi, I'm trying to make a bot with this package. After I call the client.logOn method with my account name, password and twoFactorCode, I handle the loggedOn event.But even if details.eresult is set to OK, I can't put my bot into Online state, and the event who should be fired after the login isn't emitted (like accountInfo, wallet, accountLimitations, ...). There is my little code : // Require const config = require('config'); const SteamTOTP = require('steam-totp'); const SteamUser = require('steam-user'); console.log("> Welcome."); let steamCredentials = config.get('steam'); // Init SteamUser let client = new SteamUser(); client.on('loggedOn', function(details) { if(details.eresult !== SteamUser.EResult.OK) { console.log("> An error occurred when login."); return; } console.log("> Login successful."); client.setPersona(SteamUser.EPersonaState.Online); }); // This event is emit when the connection is lost with Steam. client.on('error', function(e) { console.log("> An error occurred :"); console.log(e); }); client.on('steamguard', function(domain, callback) { console.log("> Steam Guard code needed."); let code = SteamTOTP.generateAuthCode(steamCredentials.totp_shared_secret); callback(code); }); client.on('accountInfo', function(name, country, authedMachine, flags, facebookID, facebookName) { console.log("> Your name is " + name); console.log("> Your country is " + country); }); // Now, we log on. console.log("> Initiate Login."); client.logOn({ "account_name": steamCredentials.account_name, "password": steamCredentials.password, "twoFactorCode": SteamTOTP.generateAuthCode(steamCredentials.totp_shared_secret) }); I can't see why i don't have any event after the login... Quote
Dr. McKay Posted April 18, 2017 Report Posted April 18, 2017 You're logging in anonymously, because you're using account_name instead of accountName. Jinxed740 1 Quote
Jinxed740 Posted April 18, 2017 Author Report Posted April 18, 2017 Oh dammit. I'm on it since like three hours. Thanks a lot ! Probably a confusion with the SteamUser.logOn method of node-steam... 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.