Jump to content
McKay Development

Cannot get confirmations list


Recommended Posts

Posted

I have code like this:

const SteamUser = require('steam-user');
const SteamTotp = require('steam-totp');
const config = require('./steam-config2');
const SteamCommunity = require('steamcommunity');
const TradeOfferManager = require('steam-tradeoffer-manager');
const client = new SteamUser();
const community = new SteamCommunity();
const manager = new TradeOfferManager({
    steam: client,
    community: community,
    language: 'en'
});

const logInOptions = {
	accountName: config.accountName,
	password: config.password,
	twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret)
};

client.logOn(logInOptions);

client.on('loggedOn', () => {
    console.log('Steam bot logged on');

	client.setPersona(SteamUser.Steam.EPersonaState.Online);
	client.gamesPlayed('steam trade bot');

	});



client.on('webSession', (sid, cookies) => {
	console.log('webSession');
	manager.setCookies(cookies);
	community.setCookies(cookies);
	community.startConfirmationChecker(10000, config.identitySecret);
	sendFloralShirt();
});


 community.on('debug', console.log);

function sendFloralShirt() {
    manager.loadInventory(730, 2, true, (err, inventory) => {
        if (err) {
            console.log(err);
        } else {
            const offer = manager.createOffer('76561198084368000');
    	inventory.forEach(function (item) {
        if (item.assetid === '15243530000') {
            offer.addMyItem(item);
            offer.setMessage('You received a trade offer motherfucker!');
            offer.send((err, status) => {
                if (err) {
                    console.log(err);
                } else {
                    console.log('trade sent');
				console.log(status);
				
			});



        }
    })
}
})
};

manager.on('newOffer', function () {
	console.log('offer detected');
});

In console Ive got this:

$ node index.js
Steam bot logged on
webSession
Checking confirmations
Can't check confirmations: It looks like your Steam Guard Mobile Authenticator i
s providing incorrect Steam Guard codes. This could be caused by an inaccurate c
lock or bad timezone settings on your device. If your time settings are correct,
 it could be that a different device has been set up to provide the Steam Guard
codes for your account, which means the authenticator on this device is no longe
r valid.

Al other functions works correctly: login, create outcoming trade offer, accept incoming trade offer. But I cant get confirmations list, also I cant accept offer by acceptConfirmationForObject. I cant understand whats wrong here.

Package versions is:

"steam-totp": "^2.1.0",
"steam-tradeoffer-manager": "^2.9.4",
"steam-user": "^3.29.3",
"steamcommunity": "^3.38.0"
Posted (edited)
1. Also I tried to use community.acceptConfirmationForObject on offer.send callback, but get the same resuit.

2. I use DigitalOcean vps. I think it cant get problems with time.
Edited by faza
Posted

I run this code:

SteamTotp.getTimeOffset(function (err, offset, latecy) {
        if (err){
            console.log(err);
        }  else{
            console.log('offset='+offset);
            console.log('latecy='+latecy);
        }
    });

and get:

offset=0
latecy=441

Is it mean that time is correct?

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