steamutils 1.2.72 → 1.2.74

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 +8 -2
  2. package/package.json +2 -1
package/SteamClient.js CHANGED
@@ -13,6 +13,7 @@ import {v4 as uuidv4} from 'uuid';
13
13
  import EFriendRelationship from "steam-user/enums/EFriendRelationship.js";
14
14
  import SteamCommunity from "steamcommunity";
15
15
  import ELobbyType from "steam-user/enums/ELobbyType.js";
16
+ import moment from "moment-timezone";
16
17
 
17
18
  const __filename = fileURLToPath(import.meta.url);
18
19
  const __dirname = path.dirname(__filename);
@@ -100,6 +101,7 @@ function SteamClient({
100
101
  let playingBlocked = null
101
102
  const richPresence = {}
102
103
  let sendMessageTimestamp = 0
104
+ let lastTimePartyRegister = null
103
105
 
104
106
  const onAnyCallbacks = []
105
107
 
@@ -270,7 +272,8 @@ function SteamClient({
270
272
  }
271
273
 
272
274
  function log(...msg) {
273
- console.log(`[${getAccountInfoName()}]`, ...msg)
275
+ const now = moment().tz('Asia/Ho_Chi_Minh').format("DD/MM/YYYY HH:mm:ss")
276
+ console.log(`[${now}] [${getAccountInfoName()}]`, ...msg)
274
277
  }
275
278
 
276
279
  async function getPersonas(steamIDs) {
@@ -1385,7 +1388,7 @@ function SteamClient({
1385
1388
  }
1386
1389
 
1387
1390
  function _partyRegister(prime) {
1388
- log("partyRegister", prime);
1391
+ lastTimePartyRegister = new Date().getTime()
1389
1392
  steamClient.sendToGC(730, Protos.csgo.ECsgoGCMsg.k_EMsgGCCStrike15_v2_Party_Register, {}, protoEncode(Protos.csgo.CMsgGCCStrike15_v2_Party_Register, {
1390
1393
  // id : 0,
1391
1394
  ver: CSGO_VER,
@@ -1715,6 +1718,9 @@ function SteamClient({
1715
1718
  return steamClient.steamID.getSteamID64()
1716
1719
  } catch (e) {
1717
1720
  }
1721
+ },
1722
+ getLastTimePartyRegister(){
1723
+ return lastTimePartyRegister
1718
1724
  }
1719
1725
  }
1720
1726
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.72",
3
+ "version": "1.2.74",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",
@@ -10,6 +10,7 @@
10
10
  "form-data": "^4.0.0",
11
11
  "lodash": "^4.17.21",
12
12
  "moment": "^2.29.4",
13
+ "moment-timezone": "^0.5.43",
13
14
  "node-bignumber": "^1.2.2",
14
15
  "steam-session": "^1.4.1",
15
16
  "steam-user": "^5.0.1",