steamutils 1.4.10 → 1.4.12

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 +2630 -2630
  2. package/index.js +16 -0
  3. 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`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.4.10",
3
+ "version": "1.4.12",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.6",