Jump to content
McKay Development

cockroach

Member
  • Posts

    4
  • Joined

  • Last visited

cockroach's Achievements

  1. bot.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies, function(err) { if (err) { console.log("set Cookies", err); // process.exit(1); // Fatal error since we couldn't get our API key return; }}); sendRandomItem(); setInterval(() => doPollCustom(), 2000); }); function doPollCustom() { manager.doPoll(); console.log('polling') }this console out put. polling polling polling polling polling polling polling polling polling polling polling polling polling polling polling polling polling offer sent successfully. pollData.json : {"sent":{"3363776113":2}} no change. i declined and accepted the offer. not a single even fire. pollData seems not working for me.
  2. No Error. Steam Guard App Code: DFCD5 Sending the offer Sent offer. Status: pending. I used another account that i'm sure is not limited and has active API key. the pending status is because i have authenticator on my phone. i confirm the trade request then on the second account i decline the offer. no log. on sending the offer pollData fire up and pollData.json modified. but no other events fired. i'm confused.
  3. not even the 'debug' event firing. looks like the only even fire up is 'pollData'. also i didn't set the API key on the bot Steam account. can it be the problem?
  4. Hello I guess i can`t manage to setup sentOfferChanged event. This is my code: const SteamUser = require('steam-user'); const TradeOfferManager = require('steam-tradeoffer-manager'); const fs = require('fs') // steam 2fa. generate steam guard code for login. const SteamTotp = require('steam-totp'); const bot = new SteamUser(); const manager = new TradeOfferManager({ steam: bot, language: 'en' }); if (fs.existsSync('polldata.json')) { manager.pollData = JSON.parse(fs.readFileSync('polldata.json').toString('utf8')); } bot.logOn({ accountName: 'user', password: 'password', twoFactorCode: SteamTotp.generateAuthCode('secret') }); bot.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); sendRandomItem(); }); function sendRandomItem() { console.log('Sending the offer') const partner = 'trade_url'; const offer = manager.createOffer(partner); offer.addTheirItem({ assetid: "id", appid: 730, contextid: 2 }); offer.setMessage( `HIIII` ); offer.send((err, status) => { if (err) { console.log({err}); } else { console.log(`Sent offer. Status: ${status}.`); } }); }; manager.on('sentOfferChanged', function (offer, oldState) { console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); }); manager.on('pollFailure', function (err) { console.log({err}) }) manager.on('pollData', function (pollData) { fs.writeFileSync('polldata.json', JSON.stringify(pollData)); }); This is polldata.json {"sent":{"3358172656":2}} Console log $ node ./modules/bot Sending the offer Sent offer. Status: sent. But when i accept or decline the offer sentOfferChanged doesnt fire up.
×
×
  • Create New...