steamutils 1.4.12 → 1.4.14
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 +1 -1
- package/index.js +13 -1
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -1951,7 +1951,7 @@ function SteamClient({ username, password, cookie, clientJsToken, isAutoRequestF
|
|
1951
1951
|
if (richPresence.map === undefined) {
|
1952
1952
|
richPresence.map = maps[Math.floor(Math.random() * maps.length)];
|
1953
1953
|
}
|
1954
|
-
if (richPresence.myScore
|
1954
|
+
if (richPresence.myScore >= maxRound || richPresence.theirScore >= maxRound) {
|
1955
1955
|
richPresence.myScore = 0;
|
1956
1956
|
richPresence.theirScore = 0;
|
1957
1957
|
richPresence.map = maps[Math.floor(Math.random() * maps.length)];
|
package/index.js
CHANGED
@@ -77,7 +77,10 @@ export default class SteamUser {
|
|
77
77
|
return;
|
78
78
|
}
|
79
79
|
this.Steam_Language = language;
|
80
|
-
this._cookies.forEach((cookie)
|
80
|
+
this._cookies.forEach(function (cookie) {
|
81
|
+
cookie.setCookie("Steam_Language", language);
|
82
|
+
cookie.setCookie("strInventoryLastContext", "730_2");
|
83
|
+
});
|
81
84
|
}
|
82
85
|
|
83
86
|
static parseCookie(cookies) {
|
@@ -3488,6 +3491,12 @@ export default class SteamUser {
|
|
3488
3491
|
if (match) {
|
3489
3492
|
return match[1];
|
3490
3493
|
}
|
3494
|
+
|
3495
|
+
const $ = cheerio.load(data);
|
3496
|
+
const id = $('form input[name="groupId"]').attr("value");
|
3497
|
+
if (id) {
|
3498
|
+
return id;
|
3499
|
+
}
|
3491
3500
|
}
|
3492
3501
|
|
3493
3502
|
async leaveGroup(groupSteamID) {
|
@@ -3499,6 +3508,9 @@ export default class SteamUser {
|
|
3499
3508
|
action: "leave_group",
|
3500
3509
|
"steamids[]": groupSteamID,
|
3501
3510
|
},
|
3511
|
+
headers: {
|
3512
|
+
"Content-Type": "multipart/form-data",
|
3513
|
+
},
|
3502
3514
|
method: "POST",
|
3503
3515
|
});
|
3504
3516
|
if (result instanceof ResponseError) {
|