Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
How do I get the inventory of a steam account while comparing options?

I am trying to make a steam bot and trying to program it like Kalizar bot: https://steamcommunity.com/id/KalizarLevelUpBot/

Now when you chat with the kalizar bot and type the !stats command, the bot replies how many hydra keys, tf2 keys, CS:GO keys, etc. he has in its inventory.

I have been trying to program the similar thing, just for the csgo keys, the main part what I've got so far:

const steaminventory = require("get-steam-inventory");
const ownsteamid = "<mybot'ssteamidcomeshere>";

        let rawData = data.raw.descriptions;
        let tradables = 0;
        let nonTradables = 0;
        rawData.forEach((key) => {
          if (key.tradable == 1) {
            tradables++;
          } else {
            nonTradables++;
          }

          client.chatMessage(
            steamID,
            "I have " + tradables + " tradable CSGO keys and " + nonTradables + " non-tradable ones."
          );
        });

and It works! but the only problem is that it gives the output only 26 times even though there are around 90 keys that match the description like,

`I have 0 tradable CSGO keys and 1 non-tradable ones.

I have 0 tradable CSGO keys and 2 non-tradable ones.

I have 0 tradable CSGO keys and 3 non-tradable ones.

I have 0 tradable CSGO keys and 4 non-tradable ones.

I have 0 tradable CSGO keys and 5 non-tradable ones.

...`

I want to output it as many times as the number of keys matches the condition

OR AN ALTERNATIVE count the number of keys and display them like "I have n number of tradable CS:GO keys" exactly like how the kalizar bot does it.

Any help would be appreciated, thanks.

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda