xoloth Posted December 22, 2017 Report 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
Dr. McKay Posted December 23, 2017 Report Posted December 23, 2017 You can use process.exit(0) to terminate the application. Quote
xoloth Posted December 23, 2017 Author Report 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
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.