-
Notifications
You must be signed in to change notification settings - Fork 592
/
index.js
36 lines (27 loc) · 1.29 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const steamUser = require('steam-user');
const steamTotp = require('steam-totp');
const keep_alive = require('./keep_alive.js')
var username = process.env.username;
var password = process.env.password;
var shared_secret = process.env.shared;
var games = [730, 440, 570]; // Enter here AppIDs of the needed games
var status = 1; // 1 - online, 7 - invisible
user = new steamUser();
user.logOn({"accountName": username, "password": password, "twoFactorCode": steamTotp.generateAuthCode(shared_secret)});
user.on('loggedOn', () => {
if (user.steamID != null) console.log(user.steamID + ' - Successfully logged on');
user.setPersona(status);
user.gamesPlayed(games);
});
// var username2 = process.env.username2;
// var password2 = process.env.password2;
// var shared_secret2 = process.env.shared2;
// var games2 = [730, 440, 570, 304930]; // Enter here AppIDs of the needed games
// var status2 = 1; // 1 - online, 7 - invisible
// user2 = new steamUser();
// user2.logOn({"accountName": username2, "password": password2, "twoFactorCode": steamTotp.generateAuthCode(shared_secret2)});
// user2.on('loggedOn', () => {
// if (user2.steamID != null) console.log(user2.steamID + ' - Successfully logged on');
// user2.setPersona(status2);
// user2.gamesPlayed(games2);
// });