Jump to content
McKay Development

maybe it is my problem with community.checkConfirmations();


Recommended Posts

const SteamUser = require('steam-user');
const SteamTotp = require('steam-totp');
const SteamCommunity = require('steamcommunity');
const TradeOfferManager = require('steam-tradeoffer-manager');
const config = require('./config.json');
const client = new SteamUser();

const community = new SteamCommunity();
const manager = new TradeOfferManager({
	steam: client,
	community: community,
	language: 'en'
});




const logonOptions = {
	accountName: config.username,
	password: config.password,
	twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret)

};

client.logOn(logonOptions);

client.on('loggedOn', () => {
	console.log(' GarlicBot successfully logged on. ');
	client.setPersona(SteamUser.EPersonaState.Online);
	client.gamesPlayed(["Online Now!",440]);
}); 

client.on("friendMessage", function(steamID, message) {
	if (message == "hi") {
		client.chatMessage(steamID, "hello!ne!")
	}
	else if (message == "!info") {
		client.chatMessage(steamID, "")
	}


});

client.on('webSession', (sessionid, cookies) => {
	manager.setCookies(cookies);

	community.setCookies(cookies);
	community.startConfirmationsChecker(20000, config.identitySecret);


})

function acceptOffer(offer) {
	offer.accept((err) => {

		community.checkConfirmations();
		console.log ("accpeted the offer :) ");
		if (err) console.log ("That was an error :( accept offer... ");
	}); 
}

function declineOffer(offer) {
	offer.decline((err) => {
		console.log ("decline the offer :)");
		if (err) console.log ("That was an error :(  decline offer....");
	}); 
}

client.setOption("promptSteamGuardCode", false);

when i start this and send offer to bots,

it shows me

 

C:\Users\user\Desktop\steambot\node_modules\steamcommunity\components\confirmations.js:405
        var existing = this._confirmationKeys[tag];
                                             ^

TypeError: Cannot read property 'conf' of undefined
    at SteamCommunity._confirmationCheckerGetKey (C:\Users\user\Desktop\steambot\node_modules\steamcommunity\components\confirmations.js:405:39)
    at SteamCommunity.checkConfirmations (C:\Users\user\Desktop\steambot\node_modules\steamcommunity\components\confirmations.js:351:7)
    at C:\Users\user\Desktop\steambot\steambottest.js:59:18
    at C:\Users\user\Desktop\steambot\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:528:5
    at C:\Users\user\Desktop\steambot\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:566:3
    at C:\Users\user\Desktop\steambot\node_modules\steam-tradeoffer-manager\lib\index.js:442:4
    at Object.exports.checkNeededDescriptions (C:\Users\user\Desktop\steambot\node_modules\steam-tradeoffer-manager\lib\helpers.js:90:3)
    at C:\Users\user\Desktop\steambot\node_modules\steam-tradeoffer-manager\lib\index.js:436:11
    at SteamCommunity.<anonymous> (C:\Users\user\Desktop\steambot\node_modules\steam-tradeoffer-manager\lib\webapi.js:69:3)
    at Request._callback (C:\Users\user\Desktop\steambot\node_modules\steamcommunity\components\http.js:67:15)

 

did i missspelled?

what should i do?

 

 

Link to post
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...