steamutils 1.1.57 → 1.1.58

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/SteamClient.js +18 -0
  2. package/package.json +1 -1
package/SteamClient.js CHANGED
@@ -10,6 +10,7 @@ import {fileURLToPath} from "url";
10
10
  import path from "path";
11
11
  import SteamUtils from "./index.js";
12
12
  import {v4 as uuidv4} from 'uuid';
13
+ import EFriendRelationship from "steam-user/enums/EFriendRelationship.js";
13
14
 
14
15
  const __filename = fileURLToPath(import.meta.url);
15
16
  const __dirname = path.dirname(__filename);
@@ -881,6 +882,23 @@ function SteamClient({
881
882
  }
882
883
  log('playingState', playing_blocked, playing_app);
883
884
  });
885
+
886
+ steamClient.on('friendRelationship', async function (sid, relationship, previousRelationship) {
887
+ switch (relationship) {
888
+ case EFriendRelationship.None: {
889
+ //we got unfriended.
890
+ break
891
+ }
892
+ case EFriendRelationship.RequestRecipient: {
893
+ //we got invited as a friend
894
+ break
895
+ }
896
+ case EFriendRelationship.Friend: {
897
+ //we got added as a friend
898
+ break
899
+ }
900
+ }
901
+ });
884
902
  }
885
903
 
886
904
  function sendFriendTyping(steamId, callback) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.1.57",
3
+ "version": "1.1.58",
4
4
  "main":"index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.3.4",