SHOW:
|
|
- or go back to the newest paste.
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 | - | let emailInfo='adress' |
21 | + | |
22 | let emailInfo; | |
23 | - | client.on('emailInfo', () => { |
23 | + | |
24 | - | console.log('you email is'+ emailInfo) |
24 | + | client.on('emailInfo', (err, email) => { |
25 | - | }) |
25 | + | console.log('you email is'+ email) |
26 | }); |