Jump to content
McKay Development

Recommended Posts

Posted (edited)

This is my code. How can i end process after changing avatar?

var SteamCommunity    = require ("steamcommunity");
var SteamTotp         = require ("steam-totp");
var fs                = require ("fs");
 
var client = new SteamCommunity();
 
 
 
var code = SteamTotp.generateAuthCode('myshared secret');
var logOnOptions = {
  "accountName": "name",
  "password": "pasword",
  "twoFactorCode": code
};
 
 
girisyap();
 
function girisyap()
{
  console.log("Logging into Steam...");
  client.login(logOnOptions, function(err, sessionID, cookies, steamguard) {
      if (err) {
        console.log("We have an error: " + err);
      }
      console.log("We logged in with  " + logOnOptions.accountName);
      client.loggedIn(function(err, loggedIn) {
        if(err) {
          console.log("Problem");
        }
        console.log("LoggedIN " + loggedIn);
        var steamprofilesttngs = {
          "name": "My Bot[00]",
        };
        client.editProfile(steamprofilesttngs, function(err) {
          if(err) {
            console.log(err);
          }
        });
 client.uploadAvatar('avatar-url', function(err) {if(err) {
console.log(err);


}


});                    
});   
}); 
};



Edited by xoloth
Posted

I used process exit on line 17 under girisyap() function. But console logs logging into steam and my process ends.

You can use process.exit(0) to terminate the application.

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...