Jump to content
McKay Development

TomYoki

Member
  • Posts

    82
  • Joined

  • Last visited

Everything posted by TomYoki

  1. Huh, so what you're saying is there in no possible way to extract steamID as a number out of a chat message?
  2. Hello, I've been working on a function on my bot that requires the user to insert different user's steamID64 (through chat message). The problem is I need this to be an integer. I already tried parseInt(), parseFloat() & Math. Functions, but for some reason this changes last 2 numbers of the ID to 20. (I also tried adjusting the base values (parseInt(msg[1], 10)) Any help would be appreciated!
  3. client.on('webSession', (sessionID, cookies) => { manager.setCookies(cookies, function (err) { if (err) { logger.error(err) //Ignore logger, that's winston process.exit(1); } }); community.setCookies(cookies); community.startConfirmationChecker(10000, config.identitySecret); }); Is this what you need?
  4. Here's how you can automatically accept them, it will also log who has added you client.on('friendRelationship', function(steamID, relationship) { if (relationship == SteamUser.Steam.EFriendRelationship.RequestRecipient) { client.addFriend(steamID); console.log("Accepted friend request from: " + steamID); client.chatMessage(steamID, "This line is optional, this message user will receive when bot is added."); } });
  5. You could use this module https://github.com/DPr00f/steam-api-node player.GetSteamLevel(optionalSteamId).done(function(result){ console.log(result); }); player.GetPlayerLevelDetails(optionalSteamId).done(function(result){ console.log(result); }); player.GetBadges(optionalSteamId).done(function(result){ console.log(result); }); player.GetCommunityBadgeProgress(optionalBadgeId, optionalSteamId).done(function(result){ console.log(result); });
  6. Oh, I forgot to set manager when calling the function. Now I have new issue tho \node_modules\steamcommunity\components\users.js:357 "uri": "https://steamcommunity.com/inventory/" + userID.getSteamID64() + "/" + appID + "/" + contextID, ^ TypeError: Cannot read property 'getSteamID64' of null I used to have this before I set SteamID for tradeoffer manager, and it works fine when I call it from chat command. However functions don't seem to like it Part of code: function LoadInventory(manager, callback){ manager.getInventoryContents(440, 2, true, function(err, inventory) { if (err) { console.log(err); return; } if (inventory.length == 0) { // Inventory empty console.log("TF2 inventory is empty"); return; } else { //My tids and bits console.log("Found " + inventory.length + " TF2 items"); } }); setTimeout(LoadInventory, 3600000); } LoadInventory(manager);
  7. Hello, I tried making getInventoryContents into a function so It'd be able to update time to time, however I get this error: :384 manager.getInventoryContents(440, 2, true, function(err, inventory) { ^ TypeError: Cannot read property 'getInventoryContents' of undefined Part of code: function LoadInventory(manager, callback){ manager.getInventoryContents(440, 2, true, function(err, inventory) { if (err) { console.log(err); return; } if (inventory.length == 0) { // Inventory empty console.log("TF2 inventory is empty"); return; } else {
  8. Happens for me, my app uses a lot of memo(RAM) so when it switches to swap space it will restart the app, only thing you can do is upgrade plan or cut down few bots.
  9. So I was wondering if it is possible with any of McKay's modules to read numbers and maybe even words out of chat messages. Say I'd like to search if there is this item in bots inventory and I type !search <item name> or if I want to buy keys !buykey X Is this somehow possible? Thanks in advance!
  10. So I've been making my bot and I came up with that I need to check item description for item within trade offer, I found this https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#descriptions but item.descriptions & item.description doesn't seem to work. This is my part of the code: offer.itemsToReceive.forEach(function(item) { (this is the 388th line) if (item.appid == "my app ID" && item.type.match("My match")) { if(item.descriptions.match("my description match")){ return } This is the output: .js:388 if(item.descriptions.match("my description match we were talking about")){ ^ TypeError: item.descriptions.match is not a function
  11. Hello, I'd like to know if it is possible to somehow get every item's assetID(and maybe market hash name) by calling getInventoryContents. And if so, how? Thanks in advance!
  12. Pretty sure users here hate gambling, so you're better off asking somewhere else.
  13. 1# Tags are an array. 2# Items in trade-offers don't have tags.
  14. Yes, thanks McKay. My Trading Card bot is up and running. I used item.appid == 753 and .match function to identify item type ☺
  15. Hello, I'm trying to make my bot post on user profiles on successful trade. Can anyone help me with that as I have no idea where to start.
  16. How do you check if appid is 753? Before I tried just item.name == "Cards name" and it worked fine, does this means I made sure that appid is 753? Also I'm making trading card bot, so under this line it makes sure that all other items are metals. And no - I don't think I provided language.
×
×
  • Create New...