Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda