Jump to content


Photo

Getting items from the offer

node.js node-steam-tradeoffer-manager

  • Please log in to reply
No replies to this topic

#1 TextDynasty

TextDynasty

    Advanced Member

  • Member
  • PipPipPip
  • 139 posts

Posted 14 February 2019 - 06:24 PM

I've written some lines to check the user background but I don't know how to get all of the items I am receiving and giving.

const requestReview = (offer) => {
    var user = offer.partner.getSteamID64();
    for(i = 0; i < offer.itemsToGive.length; i++){
      var giveItems = offer.itemsToGive[i].market_hash_name;
    }
    for(i = 0; i < offer.itemsToReceive.length; i++){
      var receiveItems = offer.itemsToReceive[i].market_hash_name;
    }

    client.chatMessage(config.bossSteamID, "--------------------------------");
    client.chatMessage(config.bossSteamID, "User "+user+" sent an offer above 14 keys in value. Requesting manual review...");
    client.chatMessage(config.bossSteamID, "User Backpack.tf: https://backpack.tf/profiles/"+user);
    client.chatMessage(config.bossSteamID, "Item to receive: " + receiveItems);
    client.chatMessage(config.bossSteamID, "Item to give: " + giveItems);
    client.chatMessage(config.bossSteamID, "Offer ID");
    client.chatMessage(config.bossSteamID, offer.id);
    client.chatMessage(config.bossSteamID, "--------------------------------");
    backgroundCheck(offer);
}

Right now, it would only send me the last item in the trade offer and I would like to modify it to give me all the names in the trade offer. Also is there a way to make it so it can show (ie. 19x keys, 20x ref) instead of all items with just ( , ) separating them (like keys, keys,....)? 







Also tagged with one or more of these keywords: node.js, node-steam-tradeoffer-manager

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users