Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
121
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. const client = new SteamUser();
  5.  
  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('succesfully logged on.');
  17.     client.setPersona(SteamUser.Steam.EPersonaState.Online);
  18.     client.gamesPlayed(["Custom Game",440]);
  19. });
  20.  
  21. client.on("friendMessage", function(steamID, message) {
  22.   if(message.indexOf("!help") > -1) {
  23.         client.chatMessage(steamID, "This is a help text :3");
  24.     }
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement