Jump to content
McKay Development

Recommended Posts

Posted

You should provide the arguments as arguments, not as an object.

const SteamUser = require('steam-user');
const SteamTotp = require('steam-totp');
const SteamCommunity = require('steamcommunity');
const community = new SteamCommunity();
const client = new SteamUser();
 
 
const logOnOptions = {
accountName: 'myid',
password: 'mypw',
twoFactorCode: SteamTotp.generateAuthCode('mysharedsecret')
};
 
client.logOn(logOnOptions);
 
client.on('loggedOn', () => {
console.log('Logged into Steam');
});
 
I used this code but i get this error.
c:\testbot>node index.js
Logged into Steam
c:\testbot\node_modules\steamcommunity\components\profile.js:312
                                "sId": self.steamID.getSteamID64(),
                                                   ^
 
TypeError: Cannot read property 'getSteamID64' of undefined
    at doUpload (c:\testbot\node_modules\steamcommunity\components\profile.js:312:24)
    at SteamCommunity.<anonymous> (c:\testbot\node_modules\steamcommunity\components\profile.js:243:4)
    at Request._callback (c:\testbot\node_modules\steamcommunity\components\http.js:67:15)
    at Request.self.callback (c:\testbot\node_modules\request\request.js:186:22)
    at emitTwo (events.js:125:13)
    at Request.emit (events.js:213:7)
    at Request.<anonymous> (c:\testbot\node_modules\request\request.js:1163:10)
    at emitOne (events.js:115:13)
    at Request.emit (events.js:210:7)
    at IncomingMessage.<anonymous> (c:\testbot\node_modules\request\request.js:1085:12)
  • 10 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...