Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // index.js
- const SteamUser = require('steam-user');
- const SteamTotp = require('steam-totp');
- const config = require('./config');
- const client = new SteamUser();
- const logInOptions = {
- accountName: config.accountName,
- password: config.password,
- twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret)
- };
- client.logOn(logInOptions);
- client.on('loggedOn', () => {
- console.log('logged on');
- client.setPersona(SteamUser.Steam.EPersonaState.Online);
- client.gamesPlayed(440);
- });
- // config.js
- module.exports = {
- accountName: 'your username',
- password: 'your password',
- sharedSecret: 'your shared secret'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement