Jump to content
McKay Development

Recommended Posts

Posted (edited)

So I was working on my code and I'm getting this response from console:
 
Verifying Login information
(node:2680) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
(node:2680) DeprecationWarning: Calling an asynchronous function without callback is deprecated.
 
Here's the code:
 

var fs = require('fs');
var Steam = require('steam');
var SteamUser = require('steam-user');

var client = new SteamUser();

var SteamCommunity = require('steamcommunity');

var SteamTotp = require('steam-totp');

var community = new SteamCommunity(steamClient);
var steamClient = new Steam.SteamClient();
var steamUser = new Steam.SteamUser(steamClient);
var steamFriends = new Steam.SteamFriends(steamClient);

var config;
try {
	config = JSON.parse(fs.readFileSync('./config.json'));
} catch (err) {
	console.log("Error: I couldn't parse config.json file");
	console.log(err);
	process.exit(1);
}

console.log("Verifying Login information")

client.setOption("promptSteamGuardCode", false)

client.logOn({
	"accountName": config.username,
	"password": config.password
});

client.on("webSession", function (SteamID, cookies) {
	community.setCookies(cookies);
	SteamTotp.steamID = config.steamid;
	community.startConfirmationChecker(2500, config.identity_secret);
});

client.on("LoggedOn", function (details) {
	client.setPerson(Steam.EPersonaState.Online)
	client.gamesPlayed(440)
	console.log("Logged on to steam!");
});

client.on("steamGuard", function (domain, callback, lastCodeWrong) {
	if (lastCodeWrong) {
		console.log("Last code used was wrong, Please try again.");
	}

	var shared_secret = config.shared_secret;

	callback(SteamTotp.generateAuthCode(shared_secret));
});

 
Please help :c

Edited by Dr. McKay
Please use [code] tags

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