Jump to content
McKay Development

Logout via Chat Message


CellSplitter

Recommended Posts

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 error

Here 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 by CellSplitter
Link to comment
Share on other sites

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