Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2018
1,188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const SteamUser = require('steam-user');
  2. const SteamTotp = require('steam-totp');
  3. const config = require('./config.json');
  4.  
  5. const client = new SteamUser();
  6.  
  7. const logOnOptions = {
  8. accountName: config.username,
  9. password: config.password,
  10. twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret)
  11. };
  12.  
  13. client.logOn(logOnOptions);
  14.  
  15. client.on('loggedOn', () => {
  16. console.log('Logged into Steam');
  17.  
  18. client.setPersona(SteamUser.Steam.EPersonaState.Online);
  19. client.gamesPlayed(440);
  20. });
  21.  
  22. let emailInfo;
  23.  
  24. client.on('emailInfo', (err, email) => {
  25. console.log('you email is'+ email)
  26. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement