steamutils 1.0.63 → 1.0.64
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.
- package/SteamClient.js +3 -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 { steamID } from 'steam-user/components/helpers.js'
|
13
14
|
|
14
15
|
const __filename = fileURLToPath(import.meta.url);
|
15
16
|
const __dirname = path.dirname(__filename);
|
@@ -784,8 +785,8 @@ function SteamClient({
|
|
784
785
|
}
|
785
786
|
const timestamp = new Date(data.server_timestamp).getTime()
|
786
787
|
const steamId = data.steamid_friend.getSteamID64()
|
787
|
-
const personas = await getPersonas([
|
788
|
-
const player_name = personas
|
788
|
+
const personas = await getPersonas([steamId])
|
789
|
+
const player_name = personas.find(p => p.id == steamID)?.player_name || ''
|
789
790
|
log('friendMessage', data)
|
790
791
|
const invite = [`Inited you to play a game!`, `Đã mời bạn chơi một trò chơi!`].includes(data.message_no_bbcode || data.message)
|
791
792
|
|