steamutils 1.2.13 → 1.2.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.
@@ -0,0 +1,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
+ </state>
5
+ </component>
@@ -2,8 +2,8 @@
2
2
  <module type="WEB_MODULE" version="4">
3
3
  <component name="NewModuleRootManager">
4
4
  <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/temp" />
6
5
  <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
+ <excludeFolder url="file://$MODULE_DIR$/temp" />
7
7
  <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
8
  </content>
9
9
  <orderEntry type="inheritedJdk" />
package/.idea/vcs.xml CHANGED
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
3
  <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
4
+ <mapping directory="" vcs="Git" />
5
5
  </component>
6
6
  </project>
package/SteamClient.js CHANGED
@@ -11,6 +11,7 @@ import path from "path";
11
11
  import SteamUtils from "./index.js";
12
12
  import {v4 as uuidv4} from 'uuid';
13
13
  import EFriendRelationship from "steam-user/enums/EFriendRelationship.js";
14
+ import SteamCommunity from "steamcommunity";
14
15
 
15
16
  const __filename = fileURLToPath(import.meta.url);
16
17
  const __dirname = path.dirname(__filename);
@@ -93,6 +94,7 @@ function SteamClient({
93
94
  let prime = null
94
95
  let state = 'Offline'//InGame, Online
95
96
  let isLogOff = false
97
+ let playingBlocked = null
96
98
  const richPresence = {}
97
99
 
98
100
  const events = {
@@ -924,6 +926,7 @@ function SteamClient({
924
926
  });
925
927
 
926
928
  steamClient.on('playingState', async function (playing_blocked, playing_app) {
929
+ playingBlocked = playing_blocked
927
930
  if(playing_app === 0){
928
931
  playing_app = null
929
932
  }
@@ -971,6 +974,12 @@ function SteamClient({
971
974
  steamClient.on('friendsList', async function () {
972
975
  callEvent(events.friendsList, getFriendList())
973
976
  });
977
+
978
+ steamClient.on('gifts', async function (gid, packageid, TimeCreated, TimeExpiration, TimeSent, TimeAcked, TimeRedeemed, RecipientAddress, SenderAddress, SenderName) {
979
+ const community = new SteamCommunity();
980
+ community.setCookies(await getCookiesWait())
981
+ community.redeemGift(gid)
982
+ });
974
983
  }
975
984
 
976
985
  function getFriendList() {
@@ -1423,6 +1432,9 @@ function SteamClient({
1423
1432
  },
1424
1433
  getFriendList,
1425
1434
  logOff,
1435
+ isPlayingBlocked(){
1436
+ return playingBlocked
1437
+ }
1426
1438
  }
1427
1439
  }
1428
1440
 
package/index.js CHANGED
@@ -5408,6 +5408,9 @@ class SteamUser {
5408
5408
  case "Got an item drop": {
5409
5409
  break
5410
5410
  }
5411
+ case "Random item drop": {
5412
+ break
5413
+ }
5411
5414
  case "Purchased a gift": {
5412
5415
  break
5413
5416
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.13",
3
+ "version": "1.2.14",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.4.0",