Jump to content


Photo

steam guard


Best Answer Dr. McKay , 30 November 2018 - 10:35 PM

Have you set the promptSteamGuardCode option to false?

Go to the full post


  • Please log in to reply
10 replies to this topic

#1 SpiTik

SpiTik

    Advanced Member

  • Member
  • PipPipPip
  • 32 posts

Posted 29 November 2018 - 12:53 PM

const logOnOptionsBot = {
  accountName: "xxx",
  password: "xxx",
  twoFactorCode: SteamTotp.generateAuthCode("xxxxxxxxxxxxxxxxxxx")
};
bot1.logOn(logOnOptionsBot);
bot1.on("loggedOn", () => {
    console.log("Starting ...");
    sleep(2);
    console.log("Bot");
    client.setPersona(SteamUser.Steam.EPersonaState.Online);

});

const logOnOptions = {
  accountName: "xxx",
  password: "xxx",
};

SteamUser.prototype._steamGuardPrompt = function(domain, lastCodeWrong, code) {
	if (this.options.promptSteamGuardCode) {
    bot1.on("friendMessage", (steamid, message) => {
          if(message.indexOf("!guard") === 0) {
            var code = (message.replace(/^!guard ?/, ""));
            callback(code);
        }
      });
	} else {
		this.emit('steamGuard', domain, callback, lastCodeWrong);
	}
};

client.logOn(logOnOptions);
client.on("loggedOn", () => {
    console.log("Starting ...");
    sleep(2);
    console.log("You are logged in as : SpiTik Bot");
    client.setPersona(SteamUser.Steam.EPersonaState.Online);
    client.gamesPlayed(["test"]);

});

Im try create type steam guard to the steam chat with command and i have problem and i dont know where is problem 

 

 

error : 

 
            callback(code);
            ^
 
ReferenceError: callback is not defined
 
Thanks for Help

𝓢𝓟𝓘𝓣𝓘𝓚


#2 SpiTik

SpiTik

    Advanced Member

  • Member
  • PipPipPip
  • 32 posts

Posted 29 November 2018 - 01:11 PM

Fixed 

SteamUser.prototype._steamGuardPrompt = function(domain, lastCodeWrong, callback)

Edited by SpiTik, 29 November 2018 - 01:11 PM.

𝓢𝓟𝓘𝓣𝓘𝓚


#3 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,810 posts

Posted 29 November 2018 - 01:45 PM

Why are you overriding the prototype? Don't do that, just use the steamGuard event.



#4 SpiTik

SpiTik

    Advanced Member

  • Member
  • PipPipPip
  • 32 posts

Posted 30 November 2018 - 10:10 AM

Why are you overriding the prototype? Don't do that, just use the steamGuard event.

Idk how this event work, im want log to bot with steam chat 


𝓢𝓟𝓘𝓣𝓘𝓚


#5 SpiTik

SpiTik

    Advanced Member

  • Member
  • PipPipPip
  • 32 posts

Posted 30 November 2018 - 10:16 AM

not work 

 
client.on('steamGuard', function (domain, callback) {
    console.log("Steam Guard code needed from ");
      botGuard.chatMessage(clientID, "[BOT] : Idle bot are started please enter you guard. Write !guard <code>");
      botGuard.on("friendMessage", (steamid, message) => {
          if(message.indexOf("!guard") === 0) {
              var code = (message.replace(/^!guard ?/, ""));
              callback(code);
            } else {
              botGuard.chatMessage(steamid, "[BOT] : Unknow command please contact support. If you dont know hot to use bot, bot is not for you!!")
          }
        });
});

Edited by SpiTik, 30 November 2018 - 10:18 AM.

𝓢𝓟𝓘𝓣𝓘𝓚


#6 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,810 posts

Posted 30 November 2018 - 10:35 PM   Best Answer

Have you set the promptSteamGuardCode option to false?



#7 SpiTik

SpiTik

    Advanced Member

  • Member
  • PipPipPip
  • 32 posts

Posted 01 December 2018 - 04:45 AM

nice thanks for help <3 


𝓢𝓟𝓘𝓣𝓘𝓚


#8 SpiTik

SpiTik

    Advanced Member

  • Member
  • PipPipPip
  • 32 posts

Posted 01 December 2018 - 05:11 AM

and i have one error i off script and one from two log accs work :D after offEcsG.png


𝓢𝓟𝓘𝓣𝓘𝓚


#9 SpiTik

SpiTik

    Advanced Member

  • Member
  • PipPipPip
  • 32 posts

Posted 01 December 2018 - 05:16 AM

Bot work After restart PC :D wtf  :D  :D  :D


𝓢𝓟𝓘𝓣𝓘𝓚


#10 SpiTik

SpiTik

    Advanced Member

  • Member
  • PipPipPip
  • 32 posts

Posted 03 December 2018 - 04:05 PM

And i have problem if im write two times in a row !guard guard script crashed Error : Already logged on , cannot logon again. Can you help me with this. Im try use client1.on('disconnect', function () { setTimeout(function () { start(); }, 10000); }); and not work.

𝓢𝓟𝓘𝓣𝓘𝓚


#11 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,810 posts

Posted 03 December 2018 - 08:42 PM

You need to remove your friendMessage listener after you get your Steam Guard code, otherwise it tries to login again later with the old details.






3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users