xoloth Posted December 22, 2017 Report Share Posted December 22, 2017 (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 December 22, 2017 by xoloth Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted December 23, 2017 Report Share Posted December 23, 2017 You can use process.exit(0) to terminate the application. Quote Link to comment Share on other sites More sharing options...
xoloth Posted December 23, 2017 Author Report Share Posted December 23, 2017 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. Quote Link to comment Share on other sites More sharing options...
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.