CellSplitter Posted April 3, 2019 Report Share Posted April 3, 2019 (edited) Hey, iam work on new functions for my BOT.I am currently working on boosting my main account via chat message to my BOT. The login works fine, but the logout does not work and I can't find the errorHere my Code: // Boost Owners Account START else if (MSG.toUpperCase().indexOf("!STARTBOOST") >= 0) { let BoostClient = new SteamUser(), BoostManager = new TradeOfferManager({ "steam": BoostClient, "pollInterval": "10000", "cancelTime": "1800000" // 30m in ms }), BoostCommunity = new SteamCommunity(); let BoostLogOnOptions = { accountName: CONFIG.Boost.USERNAME, password: CONFIG.Boost.PASSWORD, twoFactorCode: SteamTotp.generateAuthCode(CONFIG.Boost.SHAREDSECRET) }; BoostClient.logOn(BoostLogOnOptions); BoostClient.on("loggedOn", function() { BoostClient.getPersonas([BoostClient.steamID], (personas) => { sleep(500); console.log("[Boost Steam Account] - Login successfully!"); client.chatMessage(SENDER, "[Boost Steam Account] - Login successfully!"); BoostClient.setPersona(SteamUser.Steam.EPersonaState.Online); BoostClient.gamesPlayed(730); }); }); BoostClient.on('webSession', (sessionid, cookies) => { BoostManager.setCookies(cookies); BoostCommunity.setCookies(cookies); sleep(2000); console.log("[Boost Steam Account] - Cookies set successfully"); client.chatMessage(SENDER, "[Boost Steam Account] - Cookies set successfully"); }); sleep(7000); console.log("[Boost Steam Account] - Boosting Games Active"); client.chatMessage(SENDER, "[Boost Steam Account] - Start Boosting Games"); } else if (MSG.toUpperCase().indexOf("!STOPBOOST") >= 0) { let BoostClient = new SteamUser(); BoostClient.logOff(); sleep(1000); console.log("[Boost Steam Account] - Stop Boosting Games"); client.chatMessage(SENDER, "[Boost Steam Account] - Stop Boosting Games"); } // Boost Owners Account END It runs not in an error, but i dont log off :-((( I hope someone can help me out... THX Edited April 3, 2019 by CellSplitter Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 4, 2019 Report Share Posted April 4, 2019 You're calling logOff on a new SteamUser instance. You have to call it on the same instance that's already logged on. Quote Link to comment Share on other sites More sharing options...
CellSplitter Posted April 4, 2019 Author Report Share Posted April 4, 2019 Sometimes you do not see the forest for the trees.? Thx, now it works fine ? Dr. McKay 1 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.