-
Notifications
You must be signed in to change notification settings - Fork 10
/
bot.js
39 lines (30 loc) · 950 Bytes
/
bot.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
37
38
39
// Imports
const SteamUser = require("steam-user");
// Config
const config = require("./config.json");
for (const account in config.accounts) {
const username = config.accounts[account].details.username;
const password = config.accounts[account].details.password;
const title = config.accounts[account].settings.title;
const games = config.accounts[account].settings.games;
// Authorization
const client = new SteamUser();
client.logOn({
accountName: username,
password: password
});
// Main
client.on("loggedOn", async () => {
await Array.prototype.push.apply(
title,
games
);
await client.setPersona(
SteamUser.EPersonaState.Online
);
await client.gamesPlayed(
title
);
console.log(`Logged succesfully as ${username}.`);
});
}