faza Posted February 3, 2019 Report Posted February 3, 2019 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" Quote
Dr. McKay Posted February 5, 2019 Report Posted February 5, 2019 Do not use the confirmation checker Your time is wrong or your secret is wrong Quote
faza Posted February 6, 2019 Author Report Posted February 6, 2019 (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 February 6, 2019 by faza Quote
Dr. McKay Posted February 7, 2019 Report Posted February 7, 2019 If your clock is wrong and you can't fix it, you'll need to use getTimeOffset and account for it. Quote
faza Posted February 7, 2019 Author Report Posted February 7, 2019 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=441Is it mean that time is correct? Quote
Dr. McKay Posted February 8, 2019 Report Posted February 8, 2019 Yes, that means your time is correct. So your secret isn't. Quote
Recommended Posts
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.