Jump to content
McKay Development

TSecret

Member
  • Posts

    7
  • Joined

  • Last visited

Posts posted by TSecret

  1. I am trying to receive the rich presence information of the account that is logged in and is playing the game with gamesPlayed() method. I have also used uploadRichPresence() to upload custom rich presence that is properly displayed in steam friends (Competitive - Mirage [0 : 0]). However whenever I call requestRichPresence() method I get no callback

    this.client.requestRichPresence(730, [this.client.steamID], () => { console.log("Requested rich presence information") });

    Then I tried to grab the info using getPersonas with the steamID of the account, which gives the information, but the rich_presence method is empty list

    this.client.getPersonas([this.client.steamID], (err: string, personas: any) => {
        console.log(personas[this.client.steamID.getSteamID64()].rich_presence)
    })

     

    Did I miss anything or those methods no longer work? I am using node-steam version 4.20.1

  2. Hi, I have a question regarding interactions with Dota 2 or CSGO games. Is there a way to "control" Dota 2 client, and get notification when match is found, and then accept it. Or invite friends to lobby, or even control your hero? I heard something about Protobufs, but not sure if that is the one i need. Thanks 

  3. On 10/19/2020 at 10:16 PM, Dr. McKay said:

    Firstly, your getOffer function is incorrect. It should look something like this:

    
      getOffer = (offerID) => {
          return new Promise((resolve, reject) => {
              console.log("Getting trade offer", offerID);
              this.manager.getOffer(offerID, (err, offer) => {
                  if(err) return reject(err);
                  resolve(offer);
              });
          });
      }

    I'm not super familiar with express, but I would imagine that you'd do something like this:

    
    app.get('/tradeOffer', auth, async (req, res) => {
        let { offerID, username } = req.query;
        await accounts[username].getOffer(offerID)
        .then(offer => {console.log("Offer", offer); res.status(200).json({id: offer.id}); })
        .catch(error => console.log(error))
    })

     

    Yep, that works. Thank you!

  4. On 10/9/2020 at 9:20 AM, sNIP said:

    It is not worth it, since almost every time you will have a different ip address with each invocation, also I believe it is hard to manage events (steam message for example). In general it is worth to just use monolith application for steam bots and don't deal with serverless functions.

    Yeah u are right, events handling was so slow and I couldnt manage instances cuz it the "server" would go sleep after a while. I got digitalocean now and it works like a charm 

  5. I am hosting express server with steam accounts intstances abd currently having troubles with getOffer method callback. Im not experienced enough to work with callbacks, and google answers are not really suited for my problem, so I would like to ask your help here. 

    The code below is the functions that is executed on a get request. It calls custom function inside account instance's

    app.get('/tradeOffer', auth, async (req, res) => {
        let { offerID, username } = req.query;
        await accounts[username].getOffer(offerID)
        .then(offer => {console.log("Offer", offer)})
        .catch(error => console.log(error))
        res.status(200).json()
    })

     

    This code is a snippet of a methods inside account's instance

    getOffer = async (offerID) => {
          console.log("Getting trade offer", offerID);
          this.manager.getOffer(offerID, (err, offer) => {
              if(err) return err;
              return offer;
          })
      }

     

    The question is - how do I respond, lets say, with an offer ID on a request?

    Thanks in advance

  6. Hi, I am making a bot that can will manage my accounts.

    Currently I am having problems with an idea of storing mulltiple account classes (or instances). The best way probably is to create an array, but I am concerned if this approach will let accounts receive events like incoming messages?

    let accounts = [];
    
    function addAccount(username, password){
    	client = new Steam()
    	client.logOn({username, password});
    	client.on('loggedOn' => {
    	accounts.push(client)
    	}
    }

    What would be the best practice for this situation? Thanks in advance!

×
×
  • Create New...