Jump to content
McKay Development

Cannot read property 'toString' of undefined


Recommended Posts

Posted (edited)
client.logOn(logOnOptions);

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

   client.setPersona(SteamUser.Steam.EPersonaState.Online);
   client.gamesPlayed('Trading Emoticons And Backgrounds');
   client.chatMessage('76561198259000054', 'Logged in!')
   client.chatMessage('76561198178736621', 'Logged in!')
   community.startConfirmationChecker('20000', 'secret', function(err) {
   if (err) {
      throw err;
    }
  
  });
});

This is the code i use for logging in.

Edited by jafix
Posted

You aren't logged into the website in the loggedOn event. Wait for webSession, call community.setCookies, then start the confirmation checker (although I advise against using it, it's better to just confirm as needed).

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...