Jump to content
McKay Development

0x737368

Member
  • Posts

    20
  • Joined

  • Last visited

Posts posted by 0x737368

  1. So sometimes my bot is disconnected from steam, it reconnects and is shown as online and everything and then when a trade offer is sent to it, it outputs an error something along the lines "Error: Not Logged In". Unfortunately, I didn't save the error output. Hopefully, someone will know what I'm talking about, but I'll update this post when it happens again. My guess is that it has something to do with either steamcommunity or tradeoffermanager, probably the former.

    How can I prevent it?

  2. So after I confirm a trade to send over items, I just can't get my inventory to refresh. The way I want the bot to work is after it confirms a trade, it gets its inventory, goes through each item, checks if there's a corresponding entry for each item in the database, and if not - creates a new database. 

    So after I confirm a trade, I delete the entry of the item I'm sending away, and then run tradeOffer's manager.getInventoryContents and it still shows me that the item is there(and of course adds it back to the database). And I actually run getInventoryContents, not just reuse the inventory object from before.

    What is the problem and how could I solve it?

    Thanks :)

     

    EDIT:

    Alright, did some further testing. When the bot *receives* an item, the function works as expected and the item is added to the database. However, when it sends away the item, the inventory object still shows as if the item is there. So essentially, the inventory object is updated when receiving an item, but when it sends away the object stays there. How could that be?

  3. Alright, so I decided to rewrite the accept confirmation function with confirmation.respond, hoping I could get some insight into the problem. 

    When starting up the confKeyNeeded event is sent with a "conf" tag, just like on the PC, however on the Pi I never get a "newConfirmation" event. I'm beginning to wonder if this has something to do with the Pi itself, so tomorrow I'll fire up my old laptop if it's still alive and see if it works there. 

  4. So currently I write my bot on my regular computer, and once it's tested I upload it to my RaspberryPi so it could continue to run while my computer is off. However, this brings the issue that when there's a trade offer that needs to be confirmed it gives me this error: 

    Error: Could not find confirmation for object $offer.id
    

    Is there some sort of "cooldown" period for it to be able to work from the Pi or some way to reset it?

     

    I guess it shouldn't be a problem once the bot is finished, but whilst I'm developing it I'd like to be able to run it from both my computer and R.Pi.

     

    Thanks

  5. When I try to run the script I'm getting this error:

    /home/user/Documents/Programming/Javascript/tf2_bot/node_modules/steamcommunity/components/confirmations.js:401
    	var existing = this._confirmationKeys[tag];
    	                                     ^
    
    TypeError: Cannot read property 'conf' of undefined
     

    From searching the forum I gathered that the issue is with triggering checkConfirmations before I start confirmationChecker.

    However, when I try to start it as a callback to me initiating the community object with cookies - "test" console log doesn't fire.

    community.setCookies(cookies, function() {
    		community.startConfirmationChecker(30000, function() {
    		console.log("test");
    		});
    	});
    
    

    What am I doing wrong?

  6. Correct.

    Yeah, so I wrote this but it's giving me a HTTP 400 error, what could be the problem?

    https://pastebin.com/y5XQUBvL (sorry, the text editor here collapses all my spacing, making the code unreadable)

     

    The error happens after user.acceptFriendRequest

     

    I'm certain that the user object is correct as user.name gives the correct nickname of the user, so it must be something with how I'm calling the method

     

    Edit, nvm, there was a problem with how I was triggering the acceptFriendRequest

  7. There isn't currently a way to get incoming friend requests using node-steamcommunity. Is this something you need? If you're also using node-steam-user then you can get invites from there.

    It's not something I strictly need but would be a nice thing to do. In node-steam-user, would that be the friendRelationship event?

  8. Currently I'm using steam-user as it allows to add node-tf2 module, but there are some methods that steamcommunity has that I'd like to integrate into my script. 

    So currently I login with steam-user, and then try to pass the cookies to steamcommunity:

    client.on("webSession", function(sessionID, cookies) {
            community.setCookies(cookies);
            manager.setCookies(cookies, function(err) {
                    if (err) {
                            console.log("There was a WebSession error: " + err);
                            process.exit(1);
                            return;
                    } else {
                            console.log("Successfully got an API key: " + manager.apiK$
                    }
            });
            community.setCookies(cookies);
            community.startConfirmationChecker(30000, identitySecret); //Checks and ac$
    });

    But when I try to do operations with steamcommunity it gives me a HTTP 401 response, which means it hasn't authenticated. How do I solve this?

     
×
×
  • Create New...