Jump to content


Photo

v4 question

node.js node-steam-user

  • Please log in to reply
1 reply to this topic

#1 Froxz

Froxz

    Newbie

  • Member
  • Pip
  • 3 posts

Posted 17 February 2019 - 07:17 AM

Hi,

Currently I'm using v3 version:
 

const Steam = require('steam-client');
const SteamUser = require('steam-user');
const SteamCommunity = require('steamcommunity');
const TradeOfferManager = require('steam-tradeoffer-manager');

let client = new Steam.CMClient();

client.setHttpProxy(proxyUrl);

let user = new SteamUser(client, {
	debug: true,
	singleSentryfile: false,
	autoRelogin: true,
	dataDirectory: '/files/clients'
});

let community = new SteamCommunity();

let manager = new TradeOfferManager({
	steam: user,
	community: community
});

And in v4 I should change to:

 

const SteamUser = require('steam-user');
const SteamCommunity = require('steamcommunity');
const TradeOfferManager = require('steam-tradeoffer-manager');

let user = new SteamUser({
	debug: true,
	singleSentryfile: false,
	autoRelogin: true,
	dataDirectory: '/files/clients'
});

user.setHttpProxy(proxyUrl);

let community = new SteamCommunity();

let manager = new TradeOfferManager({
	steam: user,
	community: community
});

Can you advice please?

NOTE: so v4 node-user replaces steam-client?



#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 1,992 posts

Posted 18 February 2019 - 05:24 PM

Yes, steam-client is obsolete with v4. It's built into steam-user now. And user.setHttpProxy isn't going to work. You should use:

let user = new SteamUser({
	debug: true,
	singleSentryfile: false,
	autoRelogin: true,
	dataDirectory: '/files/clients',
	httpProxy: proxyUrl
});

  • Jmopel likes this





Also tagged with one or more of these keywords: node.js, node-steam-user

4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users