Answer the question
In order to leave comments, you need to log in
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
Answer the question
In order to leave comments, you need to log in
SteamUser.EPersonaState.Online instead of SteamUser.Steam.EPersonaState.Online =_=
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question