Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with node project.js #96

Open
JamezPabz opened this issue Aug 3, 2019 · 2 comments
Open

Issue with node project.js #96

JamezPabz opened this issue Aug 3, 2019 · 2 comments

Comments

@JamezPabz
Copy link

JamezPabz commented Aug 3, 2019

This is the code i have in the project1.js file. (mine is named bot.js):

const SteamUser = require('steam-user');
const SteamTotp = require('steam-totp');

const client = new SteamUser();

const logOnOptions = {
  accountName: 'my username',
  password: 'my password',
  twoFactorCode: SteamTotp.generateAuthCode('your_steam_shared_secret')
};

client.logOn(logOnOptions);

client.on('loggedOn', () => {
  console.log('Logged into Steam');

  client.setPersona(SteamUser.Steam.EPersonaState.Online);
  client.gamesPlayed(440);
});

code in the config.json file:

{
	"username":"my username",
	"password":"my password"
}

Everytime i use cmd (which i assume is the right thing to use) to run "node bot.js (project1.js)", nothing happens.

I'm very new to programming so this might be a stupid question :)

@Pokepunch
Copy link

I'm also having this issue.

@2cab
Copy link

2cab commented Feb 24, 2020

remove "Steam." on the line " client.setPersona(SteamUser.Steam.EPersonaState.Online);"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants