Jump to content
McKay Development

aatmjeets

Member
  • Content Count

    9
  • Joined

  • Last visited

Posts posted by aatmjeets

  1. Uncaught TypeError: setTimeout(...).unref is not a function
        at WebSocketBase.disconnect (./node_modules/websocket13/lib/base.js:68)
        at WebSocketConnection.end (./node_modules/steam-user/components/connection_protocols/websocket.js:153)
        at SteamUser._disconnect (./node_modules/steam-user/components/logon.js:312)
        at ./node_modules/steam-user/components/logon.js:259

    this is the error that I encountered. do i have to define a socket,  to use steam user here?

     

    also this, error is only encountered inside electron, the script runs fine without electron.

  2. I trying to make a csgo application on electron, since I am using node-steam user it is showing WebSocketBase.disconnect,  WebSocketConnection.end and SteamUser._disconnected issues. I think this some issue with electron, but is this important to define websockets before using steam-user. P.s. my other applications worked with socketing. the code goes here:

    const form = document.getElementById("details");
    form.addEventListener('submit',function(event){
        event.preventDefault();
        const name = document.getElementById("user").value;
        //console.log(name);
        const pass = document.getElementById("pass").value;
        //console.log(pass);
        const logOnOptions = {
              accountName: name,
             password: pass,
              twoFactorCode: SteamTotp.generateAuthCode('auth')
        };

        client.logOn(logOnOptions);

        client.on('loggedOn', () => {
              console.log('Logged into Steam');
              client.setPersona(SteamUser.EPersonaState.Online)
            client.setPersona(SteamUser.EPersonaState.Online, 'desired_name');
            client.gamesPlayed(730);
        });

    })

     

  3. I keep getting this error code 26, i am asking for a random item from an account.

    client.on('webSession', (sessionid, cookies) => {
      manager.setCookies(cookies);

      community.setCookies(cookies);
      community.startConfirmationChecker(10000, config.bot1.idSecret);
      getRandomItem();
    });

     

    function getRandomItem() {
          const partner = config.bot1.trustedParty;
          const appid = 730;
          const contextid = 2;
          const offer = manager.createOffer(partner);
          manager.loadUserInventory(partner, appid, contextid, true, (err, inventory) => {
        if (err) {
          console.log(err);
        } else {

          const item = inventory[Math.floor(Math.random() * inventory.length - 1)];
          console.log(item);
          offer.addMyItem(item);
          offer.setMessage(`can you give me this ${item.name}!`);
          offer.send((err, status) => {
            if (err) {
              console.log(err);
            } else {
              console.log(`Sent offer. Status: ${status}.`);
            }
          });
        }
      });
    }

    kindly help.

  4. for (item of inventory){

        var gg = item.actions.values();

        console.log(gg.next().value);

    }

     

    this function in manager.getUserInventoryContents gives below mentioned  output, how to get link out from the array? i have tried some things but can't figure out. Please help!

    {
      link: 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D14331270147200298841',
      name: 'Inspect in Game...'
    }

×
×
  • Create New...