Jump to content
McKay Development

aatmjeets

Member
  • Content Count

    5
  • Joined

  • Last visited

  1. Extremely sorry for wasting the time, i figured it out. It was offer.addMyItem, while it should be offer.addTheirItem.
  2. 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.
  3. Thanks for the kind reply. if have done this with out a loop like this var gg = item.actions; var str = gg[0].link; This worked for me.
  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...' }
  5. console.log(item.actions.link) shows undefined when executed.
×
×
  • Create New...