Hi, I want to make website where I can add my bots from input on site. What is best way to do it? I was thinking something like this:
app.post('submit1', (req, res) => {
var namePass = req.body;
Test.logOn(namePass);
Test.on('steamGuard', function(domain, callback) {
res.send('User name and password are correct, ask for mobile auth')
});
});
Then website will ask for code. And when i enter it, i recive it like this:
app.post('submit2', (req, res) => {
var namePassGuard = req.body;
new SteamBot(namePassGuard);
});
And then i can add in SteamBot constructor something like "when loginKey, save it in db"... So that way i will need to enter code only one time...
Am I doing it correct?
or something like this
app.post('submit2', (req, res) => {
var namePassGuard = req.body;
Test.logOn(namePassGuard);
Test.on('steamGuard', function(domain, callback) {
res.send('invalid mobile guard');
});
Test.on('loginKey', (key) =>{
something like this:
db.save(namePassGuard, key);
new SteamBot(db.this.username.and.key);
res.send("login succes")
});
});
var Test is new SteamUser()