steamutils 1.4.11 → 1.4.12
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +16 -0
- package/package.json +1 -1
package/index.js
CHANGED
@@ -3474,6 +3474,22 @@ export default class SteamUser {
|
|
3474
3474
|
return this._respondToGroupInvite(groupSteamID, false);
|
3475
3475
|
}
|
3476
3476
|
|
3477
|
+
async getGroupSteamIdFromVanilaURL(vanilaURL) {
|
3478
|
+
const result = await this._httpRequest({
|
3479
|
+
url: `groups/${vanilaURL}`,
|
3480
|
+
});
|
3481
|
+
if (result instanceof ResponseError) {
|
3482
|
+
return result;
|
3483
|
+
}
|
3484
|
+
const data = result?.data;
|
3485
|
+
if (!data || typeof data !== "string") return;
|
3486
|
+
|
3487
|
+
const match = data.match(/OpenGroupChat\(\s*'(\d+)'\s*\)/);
|
3488
|
+
if (match) {
|
3489
|
+
return match[1];
|
3490
|
+
}
|
3491
|
+
}
|
3492
|
+
|
3477
3493
|
async leaveGroup(groupSteamID) {
|
3478
3494
|
const result = await this._httpMyRequestAjax({
|
3479
3495
|
url: `friends/action`,
|