spock Posted November 2, 2016 Report Posted November 2, 2016 Is there a way to kick off auto confirmations with the node steam tradeoffer manager instead of creating another steam-community instance? Reading through the docs it says tradeoffer-manager creates a node-steam-community by default if an instance isn't applied to the constructor. If that's the case - but I didn't see any prototype functions that allow for this functionality. The use case scenario is to auto confirm trades with my bot when I send users item requests. Thanks! Quote
Dr. McKay Posted November 3, 2016 Report Posted November 3, 2016 No, you can't access the auto-created instance if you don't supply one. Just create your own and pass it in if you need to use it for confirmations. Quote
spock Posted November 3, 2016 Author Report Posted November 3, 2016 So passing it in exposes the community methods on the trade manager object? like such? var myCommunity = new SteamCommunity(); var client = new SteamUser(); var offerMananger = new TradeOfferManager({ steam: client, language: "en", cancelTime: 300000, community: myCommunity }); Assuming I logged in with my creds and 2fa would I listen for the confirmation events by calling offerManager.on('newConfirmation', function(){})? or offerManager.community.on() like so? Quote
Dr. McKay Posted November 3, 2016 Report Posted November 3, 2016 You'd use myCommunity as normal. Passing it in will cause TradeOfferManager to set cookies on it when you call offerManager.setCookies. Quote
spock Posted November 3, 2016 Author Report Posted November 3, 2016 Ah I see. I got it - Thank you! 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.