Jump to content
McKay Development

TomYoki

Member
  • Posts

    82
  • Joined

  • Last visited

Everything posted by TomYoki

  1. My bad, I assumed there might be at least something partially useful.
  2. But what about these? https://github.com/SteamRE/SteamKit/tree/master/Resources/Protobufs/tf
  3. This forum is for helping users with McKay's modules / Steam Bots, not teaching JavaScript. There's plenty of courses online, that will do just that. I suggest you have a look at https://www.codecademy.com https://www.freecodecamp.org https://www.codewars.com and come back when you have more understanding, otherwise you will run into 100 more problems. But since your cards are expiring: inventory is just an array - not object. So all you need to do is call `let filteredInventory = inventory.filter(item => {...})` which will iterate the array and each time will give you an object, named `item`, with it's values. So if item's type doesn't include your string, you wish to return it. In the result you get new array named `filteredInventory` without objects that included your string.
  4. I'm certain you want context 6, not 2. Might be useful for you to read this explanation about Steam items. https://dev.doctormckay.com/topic/332-identifying-steam-items/
  5. Quite certain this is the event from node-steamcommunity you should listen to. https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#sessionexpired
  6. `amount` property is your friend. https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#amount
  7. For getting their Steam games you can use: http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/ Non-Steam games are not real games, so you cannot get them using any official Steam methods. Only way I can think of is scraping their profiles, yet that would be very unreliable and inefficient way to do it.
  8. A duplicate of https://dev.doctormckay.com/topic/1063-editprofile-and-profile-showcase/ afaik nothing has changed since then. You may want to consider creating your own function, if showcases are that important to you.
  9. You could create an object which holds SteamID64 -> Current time + 604800000 // 604800000 Being 1 week in ms Then just iterate the object every few hours to see if current time is >= than specified time, if so - remove the user.
  10. Greetings, while working on my bot's setting module, I ran into an issue. When calling `editProfile` or `profileSettings` callback with error is returned saying. "Error: options.uri is a required argument" But earlier this week it was working just fine. This is how I'm calling it, if that's any of help. // When calling this function, "profile" object is being passed. let self = this; this.name = profile.name; this.description = profile.description; this.picture = profile.picture; this.community.editProfile({ name: self.name, summary: self.description }, (err) => { if(err){ return callback("Unable to update profile information."); } }); this.community.profileSettings({ profile: 3, comments: 3, inventory: 3, inventoryGifts: false }, (err) => { if(err){ return callback("Unable to update profile settings."); } });
  11. You could do something like let auth; setInterval(() => { auth = SteamTotpOrWhateverYouUseToGenerateAuthCodes(shared_secret); }, 1000 * 10); //Refresh code every 10 seconds; (If that's what you're attempting to accomplish)
  12. This forum is not the place for such posts as this. It's main purpose is to help with McKay's node modules, not for node/server related questions that could be answered on stack overflow and such. However, to at least partially guide you in the right direction, you'd be wanting to look at server protection. Such as strong passwords, disabled root login, sha encryption, etc. (Seriously, just google "vps protection".)
  13. Don't because: 1.) It's super annoying. 2.) It doesn't give any actual advertisement whatsoever. 3.) Bots get community banned for doing this. However, if you still choose to do it just read the actual documentation. > Either a SteamID object or a user's URL (the part after /id/) aka typeof id === 'string' ? "id/" + id : "profiles/" + id.toString()
  14. You can create a custom function that can do it, The modules supply you with the headers you'll need for the request.
  15. TomYoki

    getsteamid64?

    I am not completely sure why this happens, however this may happen if you're attempting to get it before cookies have been set. Attempt to fire the function when you have set cookies & sessionID.
  16. TomYoki

    getsteamid64?

    If you want to get the SteamID of the user currently signed in, You can use following: (Client being steam-user instance) client.steamID; client.steamID.getSteamID64() client.steamID.getSteam3RenderedID() // Function names should be self-explanatory
  17. There seems to be a bit of confusion as to the purpose of these forums. Many people seem to think that these forums exist for me to teach them how to program. Unfortunately, I don't get paid enough here to provide that service. There are countless tutorials and such online to teach you how to program in various languages. Threads which ask for lessons on JavaScript or on programming in general are liable to get ignored. So are threads which demonstrate an exceptional lack of understanding of programming or JavaScript in general.
  18. function loadinventory(AppID, ContextID) { manager.getInventoryContents(AppID, ContextID, true, function(err, inv, curr) { //You were using deprecated method if(err) { console.log("Error while loading inventory."); //Gotta use proper grammar. setTimeout(function(){ loadInventory(AppID, ContextID); }, 1000*60); //Set timeout (as Führer McKay pointed out); return; } //code }); } loadinventory(AppID, ContextID);
  19. Honestly, don't comment if you have absolutely no clue what's going on. This should work: EDIT: You also have 3 other issues with your code that I did not notice at first (as I didn't look at the main code). 1.) You are using a deprecated method. You want to use https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#getinventorycontentsappid-contextid-tradableonly-callback Example: manager.getUserInventoryContents(partner, appid, contextid, true, (err, theirInv) => {...}); 2.) Line 158 it needs to be either 'var', 'let' or 'const' unless you are wanting to re-define it. 3.) last issue (that I found) would be on line 163, what you want to do there is change it to var keyToAdd = availableKey[0] //Change it simply to 'availableKey' if you want to add all of the keys found. and from there refer to it as keyToAdd. Back to your solution for 'checkAvailableKey' function function checkAvailableKey(inventory, acceptedKeyList){ var availableKey = []; //Create an empty array where we can store item data. for(var i=0; inventory.length>i;i++){ //Loop through inventory. if (acceptedKeyList.indexOf(inventory[i].market_hash_name) >= 0){ //Check if there is this item in your array. availableKey.push(inventory[i]); //Push all item info, such as assetid, name, amount etc. } } return availableKey; //return the array with item data. /* P.S: You don't need to make the function ask for the array every time, just add the array with accepted keys in your global scope. However, this is prefered if you have multiple arrays which you want to check. */ }
  20. If you're wanting to scrape a page to interact with it you should rethink your life decisions. The ONLY way you could interact with it is using requests.
  21. Well, it works completely fine on Browser/Client & all of the group features are usable by moderators (some by users too) and it's giving this error, doesn't matter who it's trying to kick or what status he has it will always fail to kick. So I believe that it's the module that's malfunctioning.
  22. Hello, I was working on a bot that manages Steam Groups. Basically, kicks user if his message contained one of the banned keywords. All of that is working just fine, the problem is with actually kicking users. When the script attempts to kick user it gets this error: Error: You do not have the required permissions to access that group feature. at SteamCommunity._checkCommunityError (C(SHD):\Bots\GM\node_modules\steamcommunity\components\http.js:122:9) at Request._callback (C(SHD):\Bots\GM\node_modules\steamcommunity\components\http.js:51:88) at Request.self.callback (C(SHD):\Bots\GM\node_modules\request\request.js:186:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (C(SHD):\Bots\GM\node_modules\request\request.js:1163:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip.<anonymous> (C(SHD):\Bots\GM\node_modules\request\request.js:1085:12) at Gunzip.g (events.js:292:16) Of course, I would assume that the group settings don't allow the bot to kick users, which is not true as I checked it & tried it out on 2 other groups as well, one of which was made by the bot and results were always the same. Just for the record: I tried using the Object method & Non-Object method and none of them worked, both gave exactly the same response. I find this very odd considering I used to use postGroupAnnouncement which worked perfectly fine. I'm guessing that once the group invitation update hit something changed, regardless I hope to hear an answer soon as this is very frustrating. Thanks in advance.
  23. While we're on this topic, are you planning on adding these features to node-steamcommunity, and something like a feature to get Group comments, as a lot of people are wanting to make a bot that can remove people spamming "Come to this awesomesite.csgo/getScammed.php for free moneeeeeys!!1" .
×
×
  • Create New...