steamutils 1.2.33 → 1.2.35

Sign up to get free protection for your applications and to get access to all the features.
package/SteamClient.js CHANGED
@@ -1610,6 +1610,7 @@ function SteamClient({
1610
1610
  return playingBlocked
1611
1611
  },
1612
1612
  async getChatHistory(steamId) {
1613
+ if (!steamClient.steamID) return []
1613
1614
  const mySteamId = typeof steamClient.steamID.getSteamID64 === "function" ? steamClient.steamID.getSteamID64() : steamClient.steamID
1614
1615
  return new Promise(resolve => {
1615
1616
  setTimeout(resolve, 90000)
@@ -1638,6 +1639,12 @@ function SteamClient({
1638
1639
  community.redeemGift(gid)
1639
1640
  } catch (e) {
1640
1641
  }
1642
+ },
1643
+ async requestFreeLicense(...args){
1644
+ try {
1645
+ return await steamClient.requestFreeLicense(...args)
1646
+ } catch (e) {
1647
+ }
1641
1648
  }
1642
1649
  }
1643
1650
  }
package/index.js CHANGED
@@ -6003,6 +6003,22 @@ class SteamUser {
6003
6003
  return {}
6004
6004
  }
6005
6005
  }
6006
+
6007
+ async getAmountSpentOnSteam() {
6008
+ const response = (await this._httpRequest({
6009
+ url: `https://help.steampowered.com/en/`,
6010
+ }))?.data
6011
+ if (!response) {
6012
+ return null
6013
+ }
6014
+ const $ = cheerio.load(response)
6015
+ const text = $('.help_event_limiteduser .help_event_limiteduser_spend').text()
6016
+ if (text?.startsWith("Amount Spent on Steam")) {
6017
+ return text
6018
+ } else {
6019
+ return null
6020
+ }
6021
+ }
6006
6022
  }
6007
6023
 
6008
6024
  export default SteamUser
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.33",
3
+ "version": "1.2.35",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.4.0",