Jump to content
McKay Development

TotallyNotABOT

Member
  • Posts

    5
  • Joined

  • Last visited

TotallyNotABOT's Achievements

  1. Thanks a lot! Didn't really know that you can't use the same 2FA code twice. Maybe you can write that in the documentation, so that some people wouldn't get confused. Really appreciate your work!
  2. I am really interested in finding if there's a method to retrieve all the badges crafted by a specific user (SteamID). If not, what are the possible alternatives in doing so? Is there a steam web API method built for that?
  3. So, there's a problem I've had with my both that I can't really understand. I am not really looking for people to spoon feed me the code, just for someone with more experience to point it out to me. After I activated Steam Guard on my Phone. To authenticate my BOT I use the steam-totp module. What's even weirder is that the BOT logs in through node-steam-user without any problems, but has some problems when it needs to log in through node-community. Here's the exception I've been getting: Node-steam-user: authenticated. // node-steam-user works! Error: SteamGuardMobile // node-steamcommunity fails. at SteamCommunity.<anonymous> (C:\Users\Brian\node_modules\steamcommunity\index.js:141:14) at Request._callback (C:\Users\Brian\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (C:\Users\Brian\node_modules\request\request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (C:\Users\Brian\node_modules\request\request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage.<anonymous> (C:\Users\Brian\node_modules\request\request.js:1091:12) at IncomingMessage.g (events.js:291:16)And here you can see a simplified version of my BOT (not showing the entire code for obvious reasons) that tries just to authenticate. Even though node-steam-user authenticates without any problems, node-steamcommunity fails. var SteamUser = require('../index.js'); var client = new SteamUser(); var SteamCommunity = require('steamcommunity'); var community = new SteamCommunity(); var SteamTotp = require('steam-totp'); function getCode(shared_secret, callback) { SteamTotp.getTimeOffset(function (offset) { return callback(SteamTotp.getAuthCode(shared_secret, offset)); }) } getCode('shared-secret', function (code) { client.logOn({ "accountName": "username", "password": "password", "twoFactorCode": code.toString() }); community.login({ "accountName": "username", "password": "password", "twoFactorCode": code.toString() }, function (err){ if (err !== null) { console.log(err); } else {console.log("SteamCommunity - authenticated");} }); }); client.on('loggedOn', function(details) { client.setPersona(SteamUser.EPersonaState.Online); client.gamesPlayed("Test game!"); });
×
×
  • Create New...