steamutils 1.0.1 → 1.0.3
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/index.js +9 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1860,8 +1860,15 @@ class SteamUser {
|
|
1860
1860
|
}
|
1861
1861
|
}
|
1862
1862
|
|
1863
|
-
async getClientJsToken() {
|
1864
|
-
let result = (await this._httpRequest('chat/clientjstoken'))
|
1863
|
+
async getClientJsToken(retry = null) {
|
1864
|
+
let result = (await this._httpRequest('chat/clientjstoken'))?.data
|
1865
|
+
if (!result?.steamid) {
|
1866
|
+
if (retry !== null && retry !== undefined && retry >= 0) {
|
1867
|
+
return await this.getClientJsToken(retry - 1)
|
1868
|
+
} else {
|
1869
|
+
return null
|
1870
|
+
}
|
1871
|
+
}
|
1865
1872
|
|
1866
1873
|
const dataExample = {
|
1867
1874
|
logged_in: true,
|