interbots Posted July 19, 2023 Report Posted July 19, 2023 const SteamUser = require('steam-user'); const TradeOfferManager = require('steam-tradeoffer-manager'); const SteamTotp = require('steam-totp'); const Config = require("./config"); const client = new SteamUser(); client.logOn({ accountName: Config.clientUsername, password: Config.clientPassword, }); client.on('loggedOn', () => { console.log('Bot logged in successfully.'); const tradeOfferManager = new TradeOfferManager({ steam: client, language: 'en', // Replace with the desired language. domain: 'localhost', // Replace 'example.com' with your website's domain (it can be any valid domain) pollInterval: 1000 , // The interval to check for new trade offers (in milliseconds). }); tradeOfferManager.on('newOffer', (offer) => { console.log("New Offer!"); }); tradeOfferManager.on('error', (error) => { console.error('TradeOfferManager error:', error); }); }); client.on('error', (error) => { console.error('Bot error:', error); // Handle other errors here if needed. }); Quote
Dr. McKay Posted July 20, 2023 Report Posted July 20, 2023 You need to log in TradeOfferManager using setCookies. interbots 1 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.