VenomZ75 Posted June 24, 2019 Report Posted June 24, 2019 (edited) Hi there, I'm using steam-user to try to make a bot, but I cannot get it to set it's status to online. Furthermore, is there a way to check if the login was successful as the loggedOn event appears to trigger even if I try entering bogus account details. Code is as follows: const SteamUser = require ("steam-user");const SteamTotp = require ("steam-totp");const config = require("./config");const client = new SteamUser();const details = {accountName: config.accountName,password: config.password,twoFactorCode: SteamTotp.generateAuthCode("redacted"),rememberPassword: true};client.logOn(details);client.on("loggedOn", () => {console.log("signed in");client.setPersona(1);}) Edited June 24, 2019 by Dr. McKay removed secret Quote
Dr. McKay Posted June 24, 2019 Report Posted June 24, 2019 That looks right. Make sure your config.accountName is set properly. Quote
VenomZ75 Posted June 24, 2019 Author Report Posted June 24, 2019 (edited) I managed to get it working. As you suggested, there was a typo I didn't spot in the config file (module_export instead of module_exports). Many thanks for your help! Edited June 24, 2019 by VenomZ75 Dr. McKay 1 Quote
Dr. McKay Posted June 24, 2019 Report Posted June 24, 2019 Great, glad you got it working. As an explanation for why you were getting loggedOn emitting, if accountName isn't specified or is undefined, then steam-user will log onto an anonymous user account. VenomZ75 1 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.