steamutils 1.0.74 → 1.0.75

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.
Files changed (2) hide show
  1. package/SteamClient.js +7 -2
  2. package/package.json +1 -1
package/SteamClient.js CHANGED
@@ -267,7 +267,7 @@ function SteamClient({
267
267
  })
268
268
  }
269
269
 
270
- async function autoGamePlay() {
270
+ async function gamePlay() {
271
271
  let ownedApps = null
272
272
  while (!Array.isArray(ownedApps)) {
273
273
  ownedApps = (await (new SteamUtils(cookie)).getDynamicStoreUserData())?.rgOwnedApps
@@ -277,6 +277,11 @@ function SteamClient({
277
277
  steamClient.gamesPlayed([...ownedApps, 730])
278
278
  }
279
279
 
280
+ async function autoGamePlay() {
281
+ await gamePlay()
282
+ doSetInterval(gamePlay, [15 * 60000, 30 * 60000], 'autoGamePlay')
283
+ }
284
+
280
285
  async function offAutoGamePlay() {
281
286
  steamClient.gamesPlayed([])
282
287
  doClearInterval('autoGamePlay')
@@ -685,7 +690,6 @@ function SteamClient({
685
690
 
686
691
  if (autoPlay) {
687
692
  autoGamePlay()
688
- doSetInterval(autoGamePlay, [15 * 60000, 30 * 60000], 'autoGamePlay')
689
693
  }
690
694
  })
691
695
 
@@ -1120,6 +1124,7 @@ function SteamClient({
1120
1124
  sendHello,
1121
1125
  checkPlayerPrimeStatus,
1122
1126
  doClearInterval,
1127
+ gamePlay,
1123
1128
  autoGamePlay,
1124
1129
  offAutoGamePlay,
1125
1130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.0.74",
3
+ "version": "1.0.75",
4
4
  "dependencies": {
5
5
  "axios": "^1.3.4",
6
6
  "cheerio": "^1.0.0-rc.12",