Jump to content
McKay Development

Recommended Posts

Posted

HI, I wanna try to edit my profile name

function setupProfile(username) {
    community.editProfile({
        'name' 		: username,
    }, function(err) {
        if (err) {
            console.log('Failed to Edit Profile');
            console.log(err);
        }
    });
}

but I got this error

Failed to Edit Profile
Error: Not Logged In
    at SteamCommunity._checkHttpError (E:\new\steambot\node_modules\steamcommunity\components\http.js:95:9)
    at Request._callback (E:\new\steambot\node_modules\steamcommunity\components\http.js:50:61)
    at Request.self.callback (E:\new\steambot\node_modules\request\request.js:185:22)
    at Request.emit (events.js:182:13)
    at Request.<anonymous> (E:\new\steambot\node_modules\request\request.js:1161:10)
    at Request.emit (events.js:182:13)
    at Gunzip.<anonymous> (E:\new\steambot\node_modules\request\request.js:1083:12)
    at Object.onceWrapper (events.js:273:13)
    at Gunzip.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1094:12)

as you can see that give me error Not Logged In but u can see my screenshot  I already login to account,please help

 

 

post-4249-0-75083100-1550458350_thumb.png

Posted

I already do manual setup to my profile name, I already try everything like realName,summary,country,state,city,customURL,background get same error, Error: Not Logged I

user.on('loggedOn', () => {
user.setPersona(SteamUser.EPersonaState.Online);
console.log("Logged on!");
user.gamesPlayed(730);
user.emit("friendsList");
setupProfile("newname");
 
});
 
Posted

so i need to put

setupProfile("newname");

inside

user.on('webSession', (sessionid, cookies) => {
community.setCookies(cookies);
setupProfile("newname");
});

 ?

but I get error

 cookies.forEach((cookie) => {
                ^
TypeError: Cannot read property 'forEach' of undefined

 

so how to make im loggedon comunity?

Posted

here my full code

 

var username;
var password;
var Steam = require("steam");
var steamCode;
var SteamCommunity = require('steamcommunity');
var community = new SteamCommunity();
var fs = require("fs");
var SteamUser = require('steam-user');
var readline = require("readline");
var LineByLineReader = require('line-by-line'),
var user = new SteamUser();
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
 
user.on('steamGuard', function(domain, callback) {
console.log("oops we need steam guard");
 
rl.resume();
rl.question("enter SteamGuard code: ", function(answer) {
     steamCode = answer;
     rl.pause();
     callback(steamCode);
});
});
user.on('webSession', (sessionid, cookies) => {
community.setCookies(cookies);/*got error E:\new\steambot\node_modules\steamcommunity\index.js:296
        cookies.forEach((cookie) => {
                ^

TypeError: Cannot read property 'forEach' of undefined*/
setupProfile("its a name");//got Error: Not Logged In at SteamCommunity._checkHttpError (E:\new\steambot\node_modules\steamcommunity\components\http.js:95:9)
});
user.on('loggedOn', () => {
user.setPersona(SteamUser.EPersonaState.Online);
console.log("Logged on!");
user.gamesPlayed(730);
user.emit("friendsList");
user.emit("webSession");
 
});

user.on("friendsList", function() {
for (var steamid64 in user.myFriends) {
var relationship = user.myFriends[steamid64];
if (relationship == SteamUser.EFriendRelationship.RequestRecipient) {
addFriend(steamid64);
console.log("we just add frind" + steamid64);
 
}
}
});
function addFriend(steamID)
{
user.addFriend(steamID);
}
function setupProfile(username) {
community.editProfile({
'name'      : username,
}, function(err) {
if (err) {
console.log('Failed to Edit Profile');
console.log(err);
}
});
}
 
 
  • 2 weeks 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...