steamutils 1.2.87 → 1.2.89

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/SteamClient.js +206 -173
  2. package/index.js +2 -2
  3. package/package.json +1 -1
package/SteamClient.js CHANGED
@@ -78,9 +78,9 @@ const appid = 730
78
78
  export let CSGO_VER = 13960
79
79
  const FreeAppList = JSON.parse(fs.readFileSync(path.join(__dirname, 'free_packages.json'))).packages
80
80
 
81
- // SteamUtils.GetCurrentVersion(appid).then(function (ver) {
82
- // CSGO_VER = ver
83
- // })
81
+ SteamUtils.getAppVersion(appid).then(function (ver) {
82
+ CSGO_VER = ver
83
+ })
84
84
 
85
85
  const PersonasCache = []
86
86
 
@@ -105,7 +105,7 @@ function SteamClient({
105
105
  let sendMessageTimestamp = 0
106
106
  let lastTimePartyRegister = 0
107
107
  let lastTimePartySearch = 0
108
- let appsPlayed = []
108
+ const appsPlayed = []
109
109
 
110
110
  const onAnyCallbacks = []
111
111
 
@@ -373,9 +373,9 @@ function SteamClient({
373
373
  prime = false,
374
374
  game_type = 'Competitive',
375
375
  rank = 'Silver Elite',
376
- timeout = 10000,
376
+ timeout = 5000,
377
377
  } = {}) {
378
- return new Promise(resolve => {
378
+ const players = await new Promise(resolve => {
379
379
  steamClient.sendToGC(appid, Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_Party_Search, {}, protoEncode(Protos.csgo.CMsgGCCStrike15_v2_Party_Search, {
380
380
  ver: CSGO_VER,
381
381
  apr: prime ? 1 : 0,
@@ -387,6 +387,17 @@ function SteamClient({
387
387
  lastTimePartySearch = new Date().getTime()
388
388
  pushGCCallback('partySearch', resolve, timeout)
389
389
  })
390
+ if (Array.isArray(players) && players.length) {
391
+ const personas = await getPersonas(players.map(p => p.steamId))
392
+ for (const player of players) {
393
+ const persona = personas.find(p => p.id == player.steamId)
394
+ if (persona) {
395
+ player.player_name = persona.player_name
396
+ player.avatar_hash = persona.avatar_hash
397
+ }
398
+ }
399
+ }
400
+ return players
390
401
  }
391
402
 
392
403
  async function createLobby() {
@@ -568,13 +579,13 @@ function SteamClient({
568
579
  const result = protoDecode(Protos.csgo.CSOPersonaDataPublic, object_data);
569
580
  obj.PersonaDataPublic = result
570
581
  const example = {
571
- "player_level": 4,
572
- "commendation": {
573
- "cmd_friendly": 149,
574
- "cmd_teaching": 108,
575
- "cmd_leader": 115
582
+ player_level: 4,
583
+ commendation: {
584
+ cmd_friendly: 149,
585
+ cmd_teaching: 108,
586
+ cmd_leader: 115
576
587
  },
577
- "elevated_state": true
588
+ elevated_state: true
578
589
  }
579
590
  break
580
591
  }
@@ -585,11 +596,11 @@ function SteamClient({
585
596
  case 7: {
586
597
  const CSOEconGameAccountClient = protoDecode(Protos.csgo.CSOEconGameAccountClient, object_data);
587
598
  const CSOEconGameAccountClientExample = {
588
- "additional_backpack_slots": 0,
589
- "bonus_xp_timestamp_refresh": 1688518800,//Wednesday 1:00:00 AM every week
590
- "bonus_xp_usedflags": 19,
591
- "elevated_state": 5,
592
- "elevated_timestamp": 5
599
+ additional_backpack_slots: 0,
600
+ bonus_xp_timestamp_refresh: 1688518800,//Wednesday 1:00:00 AM every week
601
+ bonus_xp_usedflags: 19,
602
+ elevated_state: 5,
603
+ elevated_timestamp: 5
593
604
  } //1688518800
594
605
  if ((CSOEconGameAccountClient.bonus_xp_usedflags & 16) != 0) { // EXPBonusFlag::PrestigeEarned
595
606
  prime = true
@@ -637,10 +648,10 @@ function SteamClient({
637
648
  case 43: {
638
649
  const result = protoDecode(Protos.csgo.CSOEconDefaultEquippedDefinitionInstanceClient, object_data);
639
650
  const example = {
640
- "account_id": 1080136620,
641
- "item_definition": 61,
642
- "class_id": 3,
643
- "slot_id": 2
651
+ account_id: 1080136620,
652
+ item_definition: 61,
653
+ class_id: 3,
654
+ slot_id: 2
644
655
  }
645
656
  break
646
657
  }
@@ -811,73 +822,68 @@ function SteamClient({
811
822
  const result = protoDecode(Protos.csgo.CMsgGCCStrike15_v2_Party_SearchResults, payload)
812
823
  const entries = _.uniqBy(result.entries, 'id')
813
824
  //{
814
- // "id": 144900402,
815
- // "grp": 0,
816
- // "game_type": 8,
817
- // "apr": 1,
818
- // "ark": 17,
819
- // "loc": 20041,
820
- // "accountid": 0
825
+ // id: 144900402,
826
+ // grp: 0,
827
+ // game_type: 8,
828
+ // apr: 1,
829
+ // ark: 17,
830
+ // loc: 20041,
831
+ // accountid: 0
821
832
  // }
822
833
 
823
- const players = []
824
834
 
825
- const steamIDs = entries
826
- .map(p => SteamID.fromIndividualAccountID(p.id).getSteamID64())
827
- const personas = await getPersonas(steamIDs)
828
835
  //{
829
- // "id": "76561199265943339",
830
- // "rich_presence": [],
831
- // "persona_state": null,
832
- // "game_played_app_id": null,
833
- // "game_server_ip": null,
834
- // "game_server_port": null,
835
- // "persona_state_flags": null,
836
- // "online_session_instances": null,
837
- // "persona_set_by_user": null,
838
- // "player_name": "杀人不见血",
839
- // "query_port": null,
840
- // "steamid_source": null,
841
- // "avatar_hash": "33994e26f1fe7e2093f8c7dee66c1ac91531050d",
842
- // "last_logoff": null,
843
- // "last_logon": null,
844
- // "last_seen_online": null,
845
- // "clan_rank": null,
846
- // "game_name": null,
847
- // "gameid": null,
848
- // "game_data_blob": null,
849
- // "clan_data": null,
850
- // "clan_tag": null,
851
- // "broadcast_id": null,
852
- // "game_lobby_id": null,
853
- // "watching_broadcast_accountid": null,
854
- // "watching_broadcast_appid": null,
855
- // "watching_broadcast_viewers": null,
856
- // "watching_broadcast_title": null,
857
- // "is_community_banned": null,
858
- // "player_name_pending_review": null,
859
- // "avatar_pending_review": null,
860
- // "avatar_url_icon": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/33/33994e26f1fe7e2093f8c7dee66c1ac91531050d.jpg",
861
- // "avatar_url_medium": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/33/33994e26f1fe7e2093f8c7dee66c1ac91531050d_medium.jpg",
862
- // "avatar_url_full": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/33/33994e26f1fe7e2093f8c7dee66c1ac91531050d_full.jpg"
836
+ // id: "76561199265943339",
837
+ // rich_presence: [],
838
+ // persona_state: null,
839
+ // game_played_app_id: null,
840
+ // game_server_ip: null,
841
+ // game_server_port: null,
842
+ // persona_state_flags: null,
843
+ // online_session_instances: null,
844
+ // persona_set_by_user: null,
845
+ // player_name: "杀人不见血",
846
+ // query_port: null,
847
+ // steamid_source: null,
848
+ // avatar_hash: "33994e26f1fe7e2093f8c7dee66c1ac91531050d",
849
+ // last_logoff: null,
850
+ // last_logon: null,
851
+ // last_seen_online: null,
852
+ // clan_rank: null,
853
+ // game_name: null,
854
+ // gameid: null,
855
+ // game_data_blob: null,
856
+ // clan_data: null,
857
+ // clan_tag: null,
858
+ // broadcast_id: null,
859
+ // game_lobby_id: null,
860
+ // watching_broadcast_accountid: null,
861
+ // watching_broadcast_appid: null,
862
+ // watching_broadcast_viewers: null,
863
+ // watching_broadcast_title: null,
864
+ // is_community_banned: null,
865
+ // player_name_pending_review: null,
866
+ // avatar_pending_review: null,
867
+ // avatar_url_icon: "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/33/33994e26f1fe7e2093f8c7dee66c1ac91531050d.jpg",
868
+ // avatar_url_medium: "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/33/33994e26f1fe7e2093f8c7dee66c1ac91531050d_medium.jpg",
869
+ // avatar_url_full: "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/33/33994e26f1fe7e2093f8c7dee66c1ac91531050d_full.jpg"
863
870
  // }
871
+
872
+ const players = []
864
873
  for (const player of entries) {
865
874
  try {
866
875
  const prime = player.apr === 1 ? 'PRIME' : 'NON-PRIME'
867
876
  const loc = LOCS[player.loc] || player.loc
868
877
  const steamId = SteamID.fromIndividualAccountID(player.id).getSteamID64()
869
- const persona = personas.find(p => p.id == steamId)
870
878
  const friendCode = FriendCode.encode(steamId)
871
879
 
872
880
  // if ((LOCS[player.loc] == 'VN' || !LOCS[player.loc])) {
873
881
  players.push({
874
882
  prime,
875
- player_name: persona.player_name,
876
883
  rank: RANKS[player.ark] !== undefined ? RANKS[player.ark] : player.ark,
877
- loc: loc,
884
+ loc,
878
885
  steamId,
879
886
  friendCode,
880
- avatar_hash: persona.avatar_hash,
881
887
  })
882
888
  // }
883
889
  } catch (e) {
@@ -940,8 +946,8 @@ function SteamClient({
940
946
  if (player) {
941
947
  player.prime = !!(player.ranking?.account_id || player.player_level || player.player_cur_xp)
942
948
  player.steamId = SteamID.fromIndividualAccountID(player.account_id).getSteamID64()
949
+ callGCCallback('PlayersProfile_' + player.account_id, player)
943
950
  }
944
- callGCCallback('PlayersProfile' + player?.account_id, player)
945
951
  callEvent(events.playersProfile, player)
946
952
  break
947
953
  }
@@ -978,66 +984,66 @@ function SteamClient({
978
984
  async user(steamId, data) {
979
985
  callEvent(events.user, {steamId: steamId.getSteamID64(), data})
980
986
  const dataExample = {
981
- "rich_presence": [
987
+ rich_presence: [
982
988
  {
983
- "key": "status",
984
- "value": "Competitive Mirage [ 3 : 6 ]"
989
+ key: "status",
990
+ value: "Competitive Mirage [ 3 : 6 ]"
985
991
  },
986
992
  {
987
- "key": "version",
988
- "value": "13875"
993
+ key: "version",
994
+ value: "13875"
989
995
  },
990
996
  {
991
- "key": "game:state",
992
- "value": "game"
997
+ key: "game:state",
998
+ value: "game"
993
999
  },
994
1000
  {
995
- "key": "steam_display",
996
- "value": "#display_GameKnownMapScore"
1001
+ key: "steam_display",
1002
+ value: "#display_GameKnownMapScore"
997
1003
  },
998
1004
  {
999
- "key": "game:mode",
1000
- "value": "competitive"
1005
+ key: "game:mode",
1006
+ value: "competitive"
1001
1007
  },
1002
1008
  {
1003
- "key": "game:mapgroupname",
1004
- "value": "mg_de_mirage"
1009
+ key: "game:mapgroupname",
1010
+ value: "mg_de_mirage"
1005
1011
  },
1006
1012
  {
1007
- "key": "game:map",
1008
- "value": "de_mirage"
1013
+ key: "game:map",
1014
+ value: "de_mirage"
1009
1015
  },
1010
1016
  {
1011
- "key": "game:server",
1012
- "value": "kv"
1017
+ key: "game:server",
1018
+ value: "kv"
1013
1019
  },
1014
1020
  {
1015
- "key": "watch",
1016
- "value": "1"
1021
+ key: "watch",
1022
+ value: "1"
1017
1023
  },
1018
1024
  {
1019
- "key": "steam_player_group",
1020
- "value": "2134948645"
1025
+ key: "steam_player_group",
1026
+ value: "2134948645"
1021
1027
  },
1022
1028
  {
1023
- "key": "game:score",
1024
- "value": "[ 3 : 6 ]"
1029
+ key: "game:score",
1030
+ value: "[ 3 : 6 ]"
1025
1031
  }
1026
1032
  ],
1027
- "friendid": "76561199405834425",
1028
- "persona_state": 1,
1029
- "game_played_app_id": 730,
1030
- "game_server_ip": null,
1031
- "game_server_port": null,
1032
- "persona_state_flags": 1,
1033
- "online_session_instances": 1,
1034
- "persona_set_by_user": null,
1035
- "player_name": "quỷ súng",
1036
- "query_port": null,
1037
- "steamid_source": "0",
1038
- "avatar_hash": {
1039
- "type": "Buffer",
1040
- "data": [
1033
+ friendid: "76561199405834425",
1034
+ persona_state: 1,
1035
+ game_played_app_id: 730,
1036
+ game_server_ip: null,
1037
+ game_server_port: null,
1038
+ persona_state_flags: 1,
1039
+ online_session_instances: 1,
1040
+ persona_set_by_user: null,
1041
+ player_name: "quỷ súng",
1042
+ query_port: null,
1043
+ steamid_source: "0",
1044
+ avatar_hash: {
1045
+ type: "Buffer",
1046
+ data: [
1041
1047
  23,
1042
1048
  163,
1043
1049
  216,
@@ -1060,27 +1066,27 @@ function SteamClient({
1060
1066
  205
1061
1067
  ]
1062
1068
  },
1063
- "last_logoff": 1683950268,
1064
- "last_logon": 1683950281,
1065
- "last_seen_online": 1683950268,
1066
- "clan_rank": null,
1067
- "game_name": "",
1068
- "gameid": "730",
1069
- "game_data_blob": {
1070
- "type": "Buffer",
1071
- "data": []
1069
+ last_logoff: 1683950268,
1070
+ last_logon: 1683950281,
1071
+ last_seen_online: 1683950268,
1072
+ clan_rank: null,
1073
+ game_name: "",
1074
+ gameid: "730",
1075
+ game_data_blob: {
1076
+ type: "Buffer",
1077
+ data: []
1072
1078
  },
1073
- "clan_data": null,
1074
- "clan_tag": null,
1075
- "broadcast_id": "0",
1076
- "game_lobby_id": "0",
1077
- "watching_broadcast_accountid": null,
1078
- "watching_broadcast_appid": null,
1079
- "watching_broadcast_viewers": null,
1080
- "watching_broadcast_title": null,
1081
- "is_community_banned": null,
1082
- "player_name_pending_review": null,
1083
- "avatar_pending_review": null
1079
+ clan_data: null,
1080
+ clan_tag: null,
1081
+ broadcast_id: "0",
1082
+ game_lobby_id: "0",
1083
+ watching_broadcast_accountid: null,
1084
+ watching_broadcast_appid: null,
1085
+ watching_broadcast_viewers: null,
1086
+ watching_broadcast_title: null,
1087
+ is_community_banned: null,
1088
+ player_name_pending_review: null,
1089
+ avatar_pending_review: null
1084
1090
  }
1085
1091
  },
1086
1092
  async playingState(playing_blocked, playing_app) {
@@ -1150,21 +1156,21 @@ function SteamClient({
1150
1156
  data.message_no_bbcode = data.message_no_bbcode?.replaceAll(`ː`, `:`)
1151
1157
  data.message = data.message?.replaceAll(`ː`, `:`)
1152
1158
  const example = {
1153
- "steamid_friend": {
1154
- "universe": 1,
1155
- "type": 1,
1156
- "instance": 1,
1157
- "accountid": 1080136620
1159
+ steamid_friend: {
1160
+ universe: 1,
1161
+ type: 1,
1162
+ instance: 1,
1163
+ accountid: 1080136620
1158
1164
  },
1159
- "chat_entry_type": 1,
1160
- "from_limited_account": false,
1161
- "message": "xxx",
1162
- "ordinal": 0,
1163
- "local_echo": false,
1164
- "message_no_bbcode": "xxx",
1165
- "low_priority": false,
1166
- "server_timestamp": "2023-05-14T09:26:25.000Z",
1167
- "message_bbcode_parsed": [
1165
+ chat_entry_type: 1,
1166
+ from_limited_account: false,
1167
+ message: "xxx",
1168
+ ordinal: 0,
1169
+ local_echo: false,
1170
+ message_no_bbcode: "xxx",
1171
+ low_priority: false,
1172
+ server_timestamp: "2023-05-14T09:26:25.000Z",
1173
+ message_bbcode_parsed: [
1168
1174
  "xxx"
1169
1175
  ]
1170
1176
  }
@@ -1252,18 +1258,19 @@ function SteamClient({
1252
1258
  /*
1253
1259
  * usually take 400 -> 800 miliseconds
1254
1260
  * */
1255
- function getPlayersProfile(accountid) {
1261
+ function getPlayersProfile(steamId) {
1262
+ const accountid = new SteamID(steamId).accountid
1256
1263
  steamClient.sendToGC(730, Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_ClientRequestPlayersProfile, {}, protoEncode(Protos.csgo.CMsgGCCStrike15_v2_ClientRequestPlayersProfile, {
1257
1264
  account_id: accountid, // account_id: new SteamID('76561199184696945').accountid,
1258
1265
  request_level: 32
1259
1266
  }))
1260
1267
  return new Promise(resolve => {
1261
- pushGCCallback('PlayersProfile' + accountid, resolve, 2000)
1268
+ pushGCCallback('PlayersProfile_' + accountid, resolve, 2000)
1262
1269
  })
1263
1270
  }
1264
1271
 
1265
- async function checkPlayerPrimeStatus(accountid) {
1266
- const profile = await getPlayersProfile(accountid)
1272
+ async function checkPlayerPrimeStatus(steamId) {
1273
+ const profile = await getPlayersProfile(steamId)
1267
1274
  if (!profile) return false
1268
1275
 
1269
1276
  if (profile.ranking?.account_id) {
@@ -1446,10 +1453,10 @@ function SteamClient({
1446
1453
  }
1447
1454
 
1448
1455
  async function autoRequestFreeLicense(shouldLog = false, max = 10) {
1449
- const mCookies = await getCookiesWait()
1450
- if (!mCookies) return
1451
- const steamUtils = new SteamUtils(mCookies)
1452
- const recommendedApps = _.shuffle(FreeAppList)
1456
+ // const mCookies = await getCookiesWait()
1457
+ // if (!mCookies) return
1458
+ const freeAppList = Array.isArray(steamClient.licenses) ? FreeAppList.filter(appId => steamClient.licenses.every(({package_id}) => package_id !== appId)) : FreeAppList;
1459
+ const recommendedApps = _.shuffle(freeAppList)
1453
1460
  if (max) {
1454
1461
  recommendedApps.length = Math.min(recommendedApps.length, max)
1455
1462
  }
@@ -1477,12 +1484,12 @@ function SteamClient({
1477
1484
  // }
1478
1485
  // }
1479
1486
 
1480
- if (shouldLog) {
1481
- await sleep(20000)
1482
- const ownedAppsCount2 = (await steamUtils.getDynamicStoreUserData())?.rgOwnedApps?.length || 0
1483
- const increaseNumber = ownedAppsCount2 - ownedAppsCount;
1484
- log(`OwnedApps length ${ownedAppsCount2}, increase ${increaseNumber}`)
1485
- }
1487
+ // if (shouldLog) {
1488
+ // await sleep(20000)
1489
+ // const ownedAppsCount2 = (await steamUtils.getDynamicStoreUserData())?.rgOwnedApps?.length || 0
1490
+ // const increaseNumber = ownedAppsCount2 - ownedAppsCount;
1491
+ // log(`OwnedApps length ${ownedAppsCount2}, increase ${increaseNumber}`)
1492
+ // }
1486
1493
  }
1487
1494
 
1488
1495
  async function playCSGO() {
@@ -1581,7 +1588,10 @@ function SteamClient({
1581
1588
  if (!Array.isArray(apps)) {
1582
1589
  apps = [apps]
1583
1590
  }
1584
- appsPlayed = apps
1591
+
1592
+ appsPlayed.length = 0
1593
+ appsPlayed.push(...apps)
1594
+
1585
1595
  if (apps.length) {
1586
1596
  state = 'InGame'
1587
1597
  } else {
@@ -1610,28 +1620,28 @@ function SteamClient({
1610
1620
  /*
1611
1621
  users
1612
1622
  * {
1613
- "rich_presence": [],
1614
- "player_name": "Kei #SkinsMonkey",
1615
- "avatar_hash": [123,4543],
1616
- "last_logoff": "2023-05-20T05:00:42.000Z",
1617
- "last_logon": "2023-05-20T05:02:16.000Z",
1618
- "last_seen_online": "2023-05-20T05:00:42.000Z",
1619
- "avatar_url_icon": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/3e/3e9da0b107ac2ec384759544368a8a977359537a.jpg",
1620
- "avatar_url_medium": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/3e/3e9da0b107ac2ec384759544368a8a977359537a_medium.jpg",
1621
- "avatar_url_full": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/3e/3e9da0b107ac2ec384759544368a8a977359537a_full.jpg"
1623
+ rich_presence: [],
1624
+ player_name: "Kei #SkinsMonkey",
1625
+ avatar_hash: [123,4543],
1626
+ last_logoff: "2023-05-20T05:00:42.000Z",
1627
+ last_logon: "2023-05-20T05:02:16.000Z",
1628
+ last_seen_online: "2023-05-20T05:00:42.000Z",
1629
+ avatar_url_icon: "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/3e/3e9da0b107ac2ec384759544368a8a977359537a.jpg",
1630
+ avatar_url_medium: "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/3e/3e9da0b107ac2ec384759544368a8a977359537a_medium.jpg",
1631
+ avatar_url_full: "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/3e/3e9da0b107ac2ec384759544368a8a977359537a_full.jpg"
1622
1632
  }
1623
1633
  *
1624
1634
 
1625
1635
  myFriends
1626
1636
  {
1627
- "76561198365087582": 3,
1628
- "76561199490395123": 3
1637
+ 76561198365087582: 3,
1638
+ 76561199490395123: 3
1629
1639
  }
1630
1640
  * */
1631
1641
  /*steamClient._send({
1632
- "msg": 151,
1633
- "proto": {
1634
- "target_job_name": methodName
1642
+ msg: 151,
1643
+ proto: {
1644
+ target_job_name: methodName
1635
1645
  }
1636
1646
  }, Buffer.alloc(0), function (body, hdr) {
1637
1647
  const result = hdr.proto.eresult
@@ -1671,9 +1681,9 @@ function SteamClient({
1671
1681
  return steamClient
1672
1682
  },
1673
1683
  getAccountInfoName,
1674
- async getPlayersProfile(accountid, retry = 3){
1684
+ async getPlayersProfile(steamId, retry = 3){
1675
1685
  for (let i = 0; i < retry; i++) {
1676
- const profile = await getPlayersProfile(accountid)
1686
+ const profile = await getPlayersProfile(steamId)
1677
1687
  if(profile){
1678
1688
  return profile
1679
1689
  }
@@ -1764,6 +1774,29 @@ function SteamClient({
1764
1774
  },
1765
1775
  getLastTimePartySearch(){
1766
1776
  return lastTimePartySearch
1777
+ },
1778
+ getLicenses(){
1779
+ return steamClient.licenses
1780
+ const exampleLicenses = [{
1781
+ package_id: 303386,
1782
+ time_created: 1680491335,
1783
+ time_next_process: 0,
1784
+ minute_limit: 0,
1785
+ minutes_used: 0,
1786
+ payment_method: 1024,
1787
+ flags: 512,
1788
+ purchase_country_code: "VN",
1789
+ license_type: 1,
1790
+ territory_code: 0,
1791
+ change_number: 20615891,
1792
+ owner_id: 1530068060,
1793
+ initial_period: 0,
1794
+ initial_time_unit: 0,
1795
+ renewal_period: 0,
1796
+ renewal_time_unit: 0,
1797
+ access_token: "8049398090486337961",
1798
+ master_package_id: null
1799
+ }]
1767
1800
  }
1768
1801
  }
1769
1802
  }
package/index.js CHANGED
@@ -1319,8 +1319,8 @@ class SteamUser {
1319
1319
  }
1320
1320
  }
1321
1321
 
1322
- static async GetCurrentVersion(appID) {
1323
- for (let i = 0; i < 10; i++) {
1322
+ static async getAppVersion(appID) {
1323
+ for (let i = 0; i < 3; i++) {
1324
1324
  try {
1325
1325
  return (await request(
1326
1326
  `https://api.steampowered.com/ISteamApps/UpToDateCheck/v1/?format=json&appid=${appID}&version=0`)).data.response.required_version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.87",
3
+ "version": "1.2.89",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",