Jump to content
McKay Development

0x737368

Member
  • Posts

    20
  • Joined

  • Last visited

Everything posted by 0x737368

  1. After a somewhat long hiatus from programming bots I decided to come back to it and found that SteamCommunity no longer has a "newConfirmation" event. Can somebody please give an example of how catching and dealing with confirmations is done now? Thanks
  2. 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?
  3. 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?
  4. https://github.com/DoctorMcKay/node-steamcommunity/wiki/Steam-Confirmation-Polling#startconfirmationcheckerpollinterval-identitysecret
  5. Alright, checked it on my laptop and it works just fine. So for some reason the "newConfirmation" events are not coming through on the Pi. Could this be an issue with the node port for ARM architectures? Anyway, I guess that's a question for another forum.
  6. 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.
  7. It's been more than 24 hours and it still gets the confirmation error on the Pi. Any ideas on how to circumvent this? I figured it would be a good idea to add that I'm using steamcommunity's acceptConfirmationForObject instead of the traditional confirmationObject.respond, could this be somehow responsible?
  8. They're exactly the same. I'll keep the bot running on the Pi overnight to see if it'll reset at some point, but so far each time I tried sending it an offer requiring a confirmation it still gave me the error.
  9. I'm not confirming trades on my phone, and yet it still throws that error when I offer it a trade that requires confirmation. Anyway, I guess I'll leave the bot running on the pi and see if the trade goes through at some point.
  10. 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
  11. 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?
  12. 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
  13. 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?
  14. So say I've got a friend request, and I want the bot to accept all incoming friend request. To use the acceptFriendRequest method I need the steamID to use the getSteamUser method. How could I get it?
  15. 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...