G
G
good_beginer2019-03-15 11:28:47
Node.js
good_beginer, 2019-03-15 11:28:47

Why is the error "Cannot read property 'EPersonaState' of undefined" displayed?

const SteamUser = require('steam-user');
const SteamTotp = require('steam-totp');
const config = require('./config.json');
const client = new SteamUser();

const logOnOptions = {
  accountName: config.username,
  password: config.password,
  twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret)
};

client.logOn(logOnOptions);

client.on('loggedOn', () => {
  console.log('Success login');
  client.setPersona(SteamUser.Steam.EPersonaState.Online);
});

TypeError: Cannot read property 'EPersonaState' of undefined

Who made bots for steam, where does this error come from? everything is according to the documentation

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
good_beginer, 2019-03-15
@good_beginer

SteamUser.EPersonaState.Online instead of SteamUser.Steam.EPersonaState.Online =_=

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question