DoctorMcKay / node-globaloffensive

A Node.js module to connect to and interact with the CS2 game coordinator. Mostly used to get item data.
https://www.npmjs.com/package/globaloffensive
MIT License
262 stars 61 forks source link

What for an ID do I need? #42

Closed Wurstfach404 closed 4 years ago

Wurstfach404 commented 4 years ago

Hey...

I'm just trying out a bit. What for an steamID do I need? Tried it with the normal one STEAM_0:0:xxxxx and the steamID64

If I remove the STEAM_0:0: I get an TypeError:

/root/node_modules/globaloffensive/index.js:161 if (!steamid.isValid() || steamid.universe != SteamID.Universe.PUBLIC || steamid.type != SteamID.Type.INDIVIDUAL || steamid.instance != SteamID.Instance.DESKTOP) { ^

TypeError: steamid.isValid is not a function at GlobalOffensive.requestRecentGames (/root/node_modules/globaloffensive/index.js:161:15) at GlobalOffensive.csgo.on (/root/node_modules/csgobot/index.js:29:22) at GlobalOffensive.emit (events.js:198:13) at GlobalOffensive.handlers.(anonymous function) (/root/node_modules/globaloffensive/handlers.js:50:7) at SteamUser.GlobalOffensive._steam.on (/root/node_modules/globaloffensive/index.js:51:12) at SteamUser.emit (events.js:198:13) at SteamUser. (/root/node_modules/steam-user/components/gamecoordinator.js:82:8) at handlers.forEach (/root/node_modules/steam-user/components/classes/HandlerManager.js:37:12) at Array.forEach () at HandlerManager.emit (/root/node_modules/steam-user/components/classes/HandlerManager.js:36:12)

Wurstfach404 commented 4 years ago

I also have absolute no clue how to get the accountData

DoctorMcKay commented 4 years ago

Any SteamID string format should work.

Wurstfach404 commented 4 years ago

Oh yeah, I figured it somehow out. Just written something wrong.

I wan't to check every user in a database (seems like they don't have to be ingame, as it showed up my informations while just online) for their playersProfile. How am I supposed to do that? Just a foreach loop for each steamid in the database with a loop that checks like every 10(?)minutes?

DoctorMcKay commented 4 years ago

That should work.