steamutils 1.4.18 → 1.4.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SteamClient.js CHANGED
@@ -129,6 +129,7 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
129
129
  playingState: [],
130
130
  emailInfo: [],
131
131
  accountLimitations: [],
132
+ wallet: [],
132
133
  };
133
134
 
134
135
  const gcCallback = {};
@@ -1382,7 +1383,7 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
1382
1383
  }
1383
1384
  if (playing_blocked) {
1384
1385
  //true, false
1385
- console.log("Playing else where");
1386
+ log("Playing else where");
1386
1387
  }
1387
1388
  log("playingState", playing_blocked, playing_app);
1388
1389
  callEvent(events.playingState, { playing_blocked, playing_app });
@@ -1460,6 +1461,13 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
1460
1461
  canInviteFriends: bis_limited_account_allowed_to_invite_friends,
1461
1462
  });
1462
1463
  },
1464
+ async wallet(hasWallet, currency, balance) {
1465
+ callEvent(events.wallet, {
1466
+ hasWallet: hasWallet,
1467
+ currency: currency,
1468
+ balance: balance,
1469
+ });
1470
+ },
1463
1471
  };
1464
1472
 
1465
1473
  const _chatEvents = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.4.18",
3
+ "version": "1.4.19",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.6",
@@ -1,49 +1,49 @@
1
- import SteamUser from "./index.js";
2
- import axios from "axios";
3
- import * as cherrio from "cheerio";
4
- import SteamClient from "./SteamClient.js";
5
- import { sleep } from "./utils.js";
6
- import SteamID from "steamid";
7
-
8
- (async function () {
9
- // const loginResult = await SteamUser.communityLogin({
10
- // username: "abc",
11
- // password: "xyz",
12
- // })
13
- // console.log(loginResult.cookie);
14
- // const user = new SteamUser(loginResult.cookie)
15
-
16
- const cookie = "";
17
- const steamClient = new SteamClient({
18
- cookie,
19
- isAutoPlay: true,
20
- isPartyRegister: false,
21
- });
22
- let redeemFreeReward = false;
23
- steamClient.onEvent("csgoOnline", async function (data) {
24
- const personalStore = data.personalStore;
25
- if (!personalStore) return;
26
- const example = {
27
- items: [38468732624, 38468732625, 38468732626, 38468732627],
28
- generation_time: 1719374753000,
29
- redeemable_balance: 2,
30
- };
31
-
32
- console.log(personalStore.items);
33
- console.log(personalStore.redeemable_balance);
34
- if (!redeemFreeReward) {
35
- redeemFreeReward = true;
36
-
37
- let itemid = 38468732624;
38
- // itemid = SteamID.fromIndividualAccountID(itemid).getSteamID64();
39
- await steamClient.redeemFreeReward([itemid]);
40
- await sleep(5000);
41
- steamClient.offAutoGamePlay();
42
- await sleep(1000);
43
- steamClient.autoGamePlay();
44
- } else {
45
- process.exit(1);
46
- }
47
- });
48
- steamClient.init();
49
- })();
1
+ import SteamUser from "./index.js";
2
+ import axios from "axios";
3
+ import * as cherrio from "cheerio";
4
+ import SteamClient from "./SteamClient.js";
5
+ import { sleep } from "./utils.js";
6
+ import SteamID from "steamid";
7
+
8
+ (async function () {
9
+ // const loginResult = await SteamUser.communityLogin({
10
+ // username: "abc",
11
+ // password: "xyz",
12
+ // })
13
+ // console.log(loginResult.cookie);
14
+ // const user = new SteamUser(loginResult.cookie)
15
+
16
+ const cookie = "";
17
+ const steamClient = new SteamClient({
18
+ cookie,
19
+ isAutoPlay: true,
20
+ isPartyRegister: false,
21
+ });
22
+ let redeemFreeReward = false;
23
+ steamClient.onEvent("csgoOnline", async function (data) {
24
+ const personalStore = data.personalStore;
25
+ if (!personalStore) return;
26
+ const example = {
27
+ items: [38468732624, 38468732625, 38468732626, 38468732627],
28
+ generation_time: 1719374753000,
29
+ redeemable_balance: 2,
30
+ };
31
+
32
+ console.log(personalStore.items);
33
+ console.log(personalStore.redeemable_balance);
34
+ if (!redeemFreeReward) {
35
+ redeemFreeReward = true;
36
+
37
+ let itemid = 38468732624;
38
+ // itemid = SteamID.fromIndividualAccountID(itemid).getSteamID64();
39
+ await steamClient.redeemFreeReward([itemid]);
40
+ await sleep(5000);
41
+ steamClient.offAutoGamePlay();
42
+ await sleep(1000);
43
+ steamClient.autoGamePlay();
44
+ } else {
45
+ process.exit(1);
46
+ }
47
+ });
48
+ steamClient.init();
49
+ })();