Jump to content
McKay Development

African

Member
  • Posts

    20
  • Joined

  • Last visited

Everything posted by African

  1. Ok, I think I understand. The inviteToGroup needs to be user.inviteToGroup(groupID) while you can also use community.inviteUserToGroup(userID, groupID). Last question, when using the object method version(user.inviteToGroup) how does the script know who its inviting to the group? It's not like you can log into that account.
  2. Thanks but that doesn't have the same parameteres as what OP is using...
  3. After looking through the wiki for the SteamCommunity module I cannot find the method for inviting a user to a group. Can someone please tell me where to find info about it and how to use it. Thanks EDIT: I found where the function is mentioned but it doesn't look like its used how other people are using it as seen here.
  4. I'm wondering where you found that method "inviteUserToGroup". I looked in the wiki for the SteamCommunity module and couldn't find that method. @Dr. McKay
  5. I could do that, but I need the bot sending a message as a trigger.
  6. No, I am working on a bot for a friend. I made it so when someone types !pause the bot won't respond to commands. He wants it to be able to be !pause from himself so his friends don't have to always !pause. I'm not trying to send a message, just know when I've sent one, who to, and the message itself
  7. I was looking through the API for steam-user. I can't seem to find the event-id for when I send a message. I found one for receiving but not sending. Anyone know? Thanks
  8. function compareItems(offer){ var myItems=0; var yoItems=0; //need to get items "specialty" value and multiply by percent for (var index = 0; index < offer.itemsToGive.length; ++index) { var x= offer.itemsToGive[index].market_hash_name; var price=list[x].safe_price; console.log(x); console.log(price); if(price!=0){ myItems+=price; logger.info("Used v2 pricing"); } else{ // myItems+=list[x].7_days.average_price; steamlytics.csgo.prices(x, function(err, data){ if(err) logger.error(err); else{ myItems+=data.median_price; logger.info("Used regular price function"); console.log(data.median_price); } }); } } for (var index = 0; index < offer.itemsToRecieve.length; ++index) { var x= offer.itemsToRecieve[index].market_hash_name; var price=list[x].safe_price; console.log(x); console.log(price); if(price!=0){ yoItems+=price; logger.info("Used v2 pricing"); } else{ // myItems+=list[x].7_days.average_price; steamlytics.csgo.prices(x, function(err, data){ if(err) logger.error(err); else{ yoItems+=data.median_price; logger.info("Used regular price function"); console.log(data.median_price); } }); } } return myItems < yoItems; } I tried using the above code to run through an offer and compare the prices of each side. I get an error with the length property of the array itemsToGive/Recieve although in the API it is stated that they are arrays. I received the following error. I will attempt to do the same thing using a for-of or forEach loop. I will post again shortly with whatever happens. Thanks for reading EDIT: When I did a for-of loop it didn't give me errors, but nothing ever printed out, meaning the loop never ran. I'll look through the rest of my code to try and find why. This is my code
  9. I just finished making the bare essentials of my Trade Bot. I'm looking for a way to get reliable pricing on items. I am not sure what to use as I want information that is up to date and accurate. So far I have found the following: https://www.npmjs.com/package/node-steamlytics https://www.npmjs.com/package/csgo-market https://www.npmjs.com/package/@node-steam/market-pricing https://www.npmjs.com/package/steam-market-pricing https://github.com/andrewda/CSGOItemDB Does anyone have any recommendations on what to use?
  10. I tried this, it worked and logged in but then gave me the following error. EDIT: Nevermind, I was using the wrong value for my identity_secret. I changed it and it worked var timeOffset; //getting offset for log in SteamTotp.getTimeOffset(function(error, offset, latentcy){ timeOffset=offset; }); client.logOn({ accountName: Config.username, password: Config.password, twoFactorCode: SteamTotp.getAuthCode(Config.shared_secret, timeOffset) });
  11. I found a acceptConfimationForObject method here rather than here. I'll try it out and let you know if it works
  12. How can I confirm it, I started the confirmation checker when the client gets a web session. I am at school right now so I will post the code of how I thought it was confirmed when I get home.
  13. Hello, I have been working on a trade bot. I set it up so that it will accept any trade from me(admin) or a donation(not giving items). So far it accepts all donations but is having issues accepting trades from me. I have made sure my SteamID in my config is SteamID64. According to the console output, it says the trade should have been accepted although it hasn't. Here's the console output and heres my code. Feel free to add me on steam if you think you can help. http://steamcommunity.com/id/swagattack835/ // Accept any trade offer from the bot administrator, or where we're getting free stuff. if (offer.partner.getSteamID64() === Config.admin || offer.itemsToGive.length === 0) { logger.info("User "+ offer.partner.getSteam3RenderedID() +" offered a valid trade. Trying to accept offer."); offer.accept(function (err) { if (err) { logger.error("Unable to accept offer "+ offer.id +": " + err.message); } else { logger.info("Offer accepted"); } }); Thanks, African
  14. Hello all, I just finished working on a bot using this tutorial. After trying to use it I noticed from debugging this: Exception has occurred: Error TypeError: Cannot read property 'on' of undefined at Object.<anonymous> (c:\node\tradebot.js:127:15) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Timeout.Module.runMain [as _onTimeout] (module.js:604:10) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Here is the code causing the error. client.friends.on('relationships', function(){ After closely looking at the comments in the guide I saw McKay said this: So to fix the issue do I download the github repo for steam-user and override mine with the 1.13.0 version? Otherwise how would you go about doing things involving friends without using client.friends.on() ? Thanks for your time and help
  15. I'm interested in this. My bot is needing the Steam Guard Code to log in even though I'm using the steam-totp how you are.
  16. Hello, I used the following code to log into my account, yet when I run the script, I'm still prompted for a Steam Guard Code in terminal. This wouldn't be an issue except the bot doesn't log in until I input the code, yet it's supposed to auto generate it itself so not to have to deal with this. I know my shared_secret is correct because it is in the exact same format as the example one. var SteamTotp = require('steam-totp'); client.logOn({ accountName: Config.username, password: Config.password, twoFactorCode: SteamTotp.generateAuthCode(Config.shared_secret) }); Any ideas what I need to change? Thanks for your help
×
×
  • Create New...