Jump to content
McKay Development

Maxim

Member
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Maxim

  1. const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const SteamCommunity = require('steamcommunity'); const TradeOfferManager = require('steam-tradeoffer-manager'); const config = require('./config.js'); let winston = require('winston'); // For logging const client = new SteamUser(); const community = new SteamCommunity(); let logger = winston.createLogger({ transports: [ new (winston.transports.Console)({ colorize: true, level: 'debug' }), new (winston.transports.File)({ level: 'info', timestamp: true, filename: 'cratedump.log', json: false }) ], }); const manager = new TradeOfferManager({ steam: client, community: community, language: 'en' }); const logOnOptions = { accountName: config.username, password: config.password, twoFactorCode: SteamTotp.generateAuthCode(config.shared_secret) }; client.logOn(logOnOptions); client.on('loggedOn', () => { logger.info("Logged into Steam"); client.setPersona(SteamUser.Steam.EPersonaState.Online); client.gamesPlayed(740); }); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies, (err) => { if (err) { logger.error('Unable to set trade offer cookies: ' + err); process.exit(1); // Fatal error since we couldn't get our API key return; } logger.info("Trade offer cookies set. Got API Key: " + manager.apiKey); }); community.setCookies(cookies); }); manager.on('pollFailure', (err) => { console.log(err); logger.error("Error polling for trade offers: " + err); }); I use this.
  2. I an used that but hane problem - Error polling for trade offers: Error: socket hang up. Mb you can tell me how check this problem, which rules need in firewall? Or mb have tutorial
  3. Hi, i have 2 servers and have problem with http and my bot didn't working. So which hosting better for bot and mb have tutorial for setup guide server?
  4. I have problem: 2019-01-14T16:31:25.036Z - error: Error polling for trade offers: Error: socket hang up2019-01-14T18:31:43.234Z - error: Error polling for trade offers: Error: socket hang upMy server:- Ubuntu 14.04 Plesk (64bit)- I use nodejs server with express + ssl My suuport told me do this ( https://support.plesk.com/hc/en-us/articles/115002107425--HUB-503-Service-Unavailable-on-Plesk-server ). After i do this: (set Default site to none via Plesk: Tools & Settings>IP Addresses> your_IP_Address ).All this didn't help me, what i need do?
  5. I have problem: 2019-01-14T16:31:25.036Z - error: Error polling for trade offers: Error: socket hang up2019-01-14T18:31:43.234Z - error: Error polling for trade offers: Error: socket hang upMy server:- Ubuntu 14.04 Plesk (64bit)- I use nodejs server with express + ssl My suuport told me do this ( https://support.plesk.com/hc/en-us/articles/115002107425--HUB-503-Service-Unavailable-on-Plesk-server ). After i do this: (set Default site to none via Plesk: Tools & Settings>IP Addresses> your_IP_Address ).All this didn't help me, what i need do?
×
×
  • Create New...