Jump to content
McKay Development

newOffer not triggering

Recommended Posts

const SteamUser = require('steam-user');
const TradeOfferManager = require('steam-tradeoffer-manager');
const SteamTotp = require('steam-totp');
const Config = require("./config");
const client = new SteamUser();
    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.
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...