Harry Posted May 2, 2021 Report Posted May 2, 2021 (edited) Not sure if it is possible, but I would like to get game's follower count using node-steam-user. What I have tried, is creating a similar method to getPlayerCount, but replacing the message. So, what I came up with looks like this: SteamUser.prototype.getFollowerCount = function(appid, callback) { return StdLib.Promises.timeoutCallbackPromise(10000, [], callback, (resolve, reject) => { this._send(SteamUser.EMsg.ClientFSGetFollowerCount, [730], (body) => { console.log(body); resolve('done'); }); }); }; But with this approach, calling the new method gets me a Type Error: TypeError [ERR_INVALID_ARG_TYPE]: The "list[1]" argument must be one of type Array, Buffer, or Uint8Array. Received type object at Function.concat (buffer.js:479:13) at SteamUser._send (/home/harry/steam-tools/node_modules/steam-user/components/messages.js:456:31) at StdLib.Promises.timeoutCallbackPromise (/home/harry/steam-tools/src/steam-client.js:8:8) at Promise (/home/harry/steam-tools/node_modules/@doctormckay/stdlib/components/promises.js:22:25) at new Promise (<anonymous>) at Object.Promises.timeoutPromise (/home/harry/steam-tools/node_modules/@doctormckay/stdlib/components/promises.js:10:9) at Object.Promises.timeoutCallbackPromise (/home/harry/steam-tools/node_modules/@doctormckay/stdlib/components/promises.js:83:25) at SteamUser.getHarryTest (/home/harry/steam-tools/src/steam-client.js:7:25) at SteamUser.<anonymous> (/home/harry/steam-tools/src/steam-client.js:44:12) at SteamUser.emit (events.js:198:13) So, this raises me a few questions: 1. Am I even able to create new methods in this way (sending a different message with appropriate body) or are there some limitations that I am not aware of? 2. If the approach is fine, then how can I figure out the correct message body that I need to send? Is it documented somewhere or is there some method of figuring it out? (I am assuming that my issue is coming from invalid message body). 3. Of course, I would be very thankful for the help of resolving the actual issue here or some directions to solving it Edited May 3, 2021 by Harry Quote
Harry Posted May 3, 2021 Author Report Posted May 3, 2021 Some progress. I added this to messages.js: protobufs[EMsg.ClientFSGetFollowerCount] = Schema.CMsgFSGetFollowerCount; protobufs[EMsg.ClientFSGetFollowerCountResponse] = Schema.CMsgFSGetFollowerCountResponse; And changed my new method to: SteamUser.prototype.getFollowerCount = function(appid, callback) { return StdLib.Promises.timeoutCallbackPromise(10000, [], callback, (resolve, reject) => { this._send(SteamUser.EMsg.ClientFSGetFollowerCount, {'steam_id': '103582791432902485'}, (body) => { console.log(body); resolve('done'); }); }); }; Value of body in the callback: { eresult: 1, count: 0 } So, seems that I am sending the message correctly now, but either using wrong ID for CS:GO or misusing the library somehow. Quote
Dr. McKay Posted May 4, 2021 Report Posted May 4, 2021 It seems to me that CMsgFSGetFollowerCount is for getting the follower count of a user, not of an app. Quote
Harry Posted May 4, 2021 Author Report Posted May 4, 2021 (edited) Thank you! Seems so... Do You know if it is possible to get the follower count somehow? Searching from the list of messages, I found AMGetClanMembers, but I haven't been able to try it yet, because it isn't as simple to add it as the follower count. For ClientFSGetFollowerCount I found CMsgFSGetFollowerCount, but for AMGetClanMembers I can't find the counterpart - maybe You can give me an advice on this sort of situation as well or point me to the right direction? Edited May 4, 2021 by Harry Quote
Dr. McKay Posted May 4, 2021 Report Posted May 4, 2021 AMGetClanMembers might not be a protobuf message. In any case, it might not work at all, and even if it does it's most likely only going to give you either a list or a count of members in a Steam group, not followers of an app. It may not be possible to get the number of followers of an app. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.