Jump to content
McKay Development

Search the Community

Showing results for tags 'Question'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • Releases & Updates
  • Help & Support
    • General
    • Guides
    • node-steam-user
    • node-steamcommunity
    • node-steam-tradeoffer-manager

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Location


Interests

Found 651 results

  1. Hello everyone! So I've been working on a bot that will invite people to a steam group when they accept the friend request, my following question for this is if it's possible to add random people. For an example: One person adds the bot, then we add all their friends from their friendlist and so that cycle goes on. If you got any ideas then please hit me up. I'll also import my code below. // DEFINES const SteamUser = require('steam-user'); const config = require('./config.json'); const client = new SteamUser(); // CONFIGS var message = "Hello, would you like to be kind and join my steam group? :)"; var messageNoReply = "Sorry, but this account is a bot. We can't answer you :("; var delay = 2000; // LOGIN const accountInfo = { accountName: config.accountName, password: config.password }; client.logOn(accountInfo); client.on('loggedOn', function(details) { console.log("Logged into steam successfully!"); client.setPersona(SteamUser.EPersonaState.Online); }); // REQUEST MANAGER client.on('friendRelationship', (steamid, relationship) => { if (relationship === 2) { // ACCEPT PENDING ERQUESTS console.log("Accepted friendrequest from: " + steamid); client.addFriend(steamid); } if (relationship === 3) { setTimeout(function() { // SEND MESSAGE & INVITE TO GROUP client.chatMessage(steamid, message); client.inviteToGroup(steamid, config.groupID); console.log("Action against: " + steamid); // REMOVE FRIEND setTimeout(function() { client.removeFriend(steamid) console.log("Removed friend: " + steamid); }, 5000); }, delay); } }); // FRIENDSLIST client.on("friendsList", function() { console.log("%j", client.myFriends); }); // REPLY WITH NO-REPLY MESSAGE client.on('friendMessage', function(steamid, message) { client.chatMessage(steamid, messageNoReply); }); Thank you all for helping around within this community!
  2. Hello! I'm getting an empty object on setCookies callback, I need to generate an apiKey on Steam before? client.on('webSession', (sessionID, cookies) => { manager.setCookies(cookies, (err) => { if (err !== null) { log.error('Could not set manager cookies', { err }); process.exit(1); return; } log.info('Got API key', { apiKey: manager.apiKey }); }); community.setCookies(cookies); });
  3. Hello, I keep getting a bad request error (400) when I try to post with this function. All the info I have in the function should be correct. Any ideas? community.httpRequestPost("https://steamcommunity.com/market/sellitem/", { data: { 'sessionid': sessionID, 'appid': 730, 'contextid': 2, 'assetid': 18534283110, 'amount': 1, 'price': 1 } }, function(err) { if (err) throw err; }); It gets the sessionID variable from logging in, so that shouldn't be an issue.
  4. Hey Dr. McKay, The bot has several identical items in inventory. [{ market_hash_name: 'Inscribed Tormented Staff', pos: 1, // ... other fields }, { market_hash_name: 'Inscribed Tormented Staff', pos: 2, // ... other fields }] My task is to create 2 TradeOffers for different people and send one of the items. The problem is that all requests are asynchronous. And he creates trades offer for the same item, which is in the same bot inventory position (pos = 1). If you accept one trade, then the second trade is no longer available. What is the best way to solve this problem? Thank you for your attention and thank you for your work!
  5. Hi, I was trying to do some code with this npm package and everything was fine but webstorm still warns me that client.on() is undefined but it's working just fine but it is really annoying to have it there. Is there any way to fix that, I'm kinda new into this stuff so I don't know if I should change something in steam-user package to satisfy webstorm or just leave it be...
  6. Hello, I was using steam web api to get information about a trade, and I want my bot to be able to check what items the user would be receiving, and make a new trade with those same items. I have the code to parse the items to be received, but I am not sure how I would separate each item and create a new trade offer with the information. var url = "http://api.steampowered.com/IEconService/GetTradeOffer/v1/?" + "key=redacted" +"&tradeofferid=3844057934" request({ url: url, json: true }, function (error, response, body) { if (!error && response.statusCode === 200) { console.log(body.response.offer.items_to_receive); }}); Any help is appreciated!
  7. Hello, I have a very strange question. Can I transfer session from node-steam to steam client and back? If it's possible please tell me how. @anna96
  8. How do I get the direct detection of the bot when I change the content of the /message file. I do not want to close and open the bot and enter the guard code.
  9. How to comment on the drawing showcase and screenshot and how do I like it?
  10. //Logging ON client.logOn(logOnOptions); client.on('loggedOn', function (details) { if (details.eresult == SteamUser.EResult.OK) { client.getPersonas([client.steamID], function (personas) { console.log("== Logged in =============") console.log('== Name: ' + personas[client.steamID]["player_name"]); console.log('== ID64: ' + client.steamID); console.log("=========================="); console.log(""); }); client.setPersona(5); //"5": "LookingToTrade" -- https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EPersonaState.js client.gamesPlayed('Accepting Junk and Making Friends'); } else { console.log(details); //Do whatever u want to handle the error... } }); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); }); As soon as the bot starts everythings works fine. After some minutes, every time an offer is received by the bot, I get the "Not Logged In" error. I set up a cron (after reading a similar thread on this forum), like this: //Session refresh every 15 minutes cron.schedule('*/15 * * * *', () => { if (client.steamID) { client.webLogOn(); } else { client.logOn(logOnOptions); console.log('Logged in again using cron'); } }); but the "not logged in" error still remains. I also read this topic where Admin says this but at this point I don't understand which session needs to be refreshed and how. Also calling "sessionExpired" isn't helping because whenever an incoming trade offer gives me the error, bot doesn't try anymore to accept it, even after session is refreshed, so I have to restart it. manager.on('newOffer', offer => { if (offer.partner.getSteamID64() === 'my_stemid_64') { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Accepted offer from owner. Status: ${status}.`); } }); } else { if (offer.itemsToGive.length === 0) { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Donation accepted. Status: ${status}.`); } }); } else { offer.decline(err => { if (err) { console.log(err); } else { console.log('Donation declined (wanted our items).'); } }); } } }); Any help would be appreciated.
  11. Hello. everything was perfect before, was working perfectly but now after sending 1 trade it can't send back to the same account. how can i fix this error please help me. C:\node-steam-trade-farm-master\node-steam-trade-farm-master>node bot Main Client Logged In! Bot Client Logged In! The item in which we are using is a/an tan boots Trade offered. Counter is at : 0 Trade #1 Second Account found an Offer! Second Account, has accepted trade. Now sending it back. { Error: There was an error sending your trade offer. Please try again later. ( 15) at Object.exports.makeAnError (C:\node-steam-trade-farm-master\node-steam-tr ade-farm-master\node_modules\steam-tradeoffer-manager\lib\helpers.js:17:12) at SteamCommunity.manager._community.httpRequestPost (C:\node-steam-trade-fa rm-master\node-steam-trade-farm-master\node_modules\steam-tradeoffer-manager\lib \classes\TradeOffer.js:349:12) at Request._callback (C:\node-steam-trade-farm-master\node-steam-trade-farm- master\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (C:\node-steam-trade-farm-master\node-steam-trade-f arm-master\node_modules\request\request.js:185:22) at Request.emit (events.js:182:13) at Request.<anonymous> (C:\node-steam-trade-farm-master\node-steam-trade-far m-master\node_modules\request\request.js:1161:10) at Request.emit (events.js:182:13) at Gunzip.<anonymous> (C:\node-steam-trade-farm-master\node-steam-trade-farm -master\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:273:13) at Gunzip.emit (events.js:187:15) eresult: 15 } Error, sending send back trade.
  12. Hello, when someone sends a trading offer to the boat. Unknown Command sends message How can I exclude this
  13. So, I have two clients setup and running on my file. I want to be able to get the contents of a trade on the first bot, and pass those items along to the second bot so that it can make a trade accordingly.
  14. I am trying to set cookies for two different bots running in the same file, and when I get to the second bot, the script errors: Error: Access Denied at SteamCommunity.<anonymous> (C:\Users\easto\node_modules\steamcommunity\components\webapi.js:15:20) at Request._callback (C:\Users\easto\node_modules\steamcommunity\components\http.js:67:15) at Request.self.callback (C:\Users\easto\node_modules\request\request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (C:\Users\easto\node_modules\request\request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at Gunzip.<anonymous> (C:\Users\easto\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:313:30) The second bot successfully logins, it only errors when setting the cookies for the second bot.
  15. I wanted to be able to make my bot be able to tell the difference between tf2 items and unusual effect, for example I want my steam trading bot to recognize unusual effect like burning flame hong kong cone, disco beat down hong kong cone etc. I don't know whether the code should be in .JSON file or .js. However I lack the knowledge to do so. Help would be appreciated, thanks! Bot.js
  16. Hello world :3. I'm trying to catch any posible error output when i login. First i tried with try catch, but it didn't work in any way i tried, then investigating i got to know that it needed to be done by adding an event listener to the error event, but when i try to implement the event listener, i get the error that evenlistener is not a function: client.logOn.addEventListener("error", function(err) { if ( err ) { console.log('Critical error!!!!! '+ err + ' Check data of:'+client.steamID) } }, true); Since i already did this post, i'll add one more question; How can i call the value from a diferent place, for example if i want to show the value of "limited" from client.on('accountLimitations'), and call it in a fs.writefile that i have inside client.on('loggedOn', i have to do it by making a global.limited, or how can i?, the other way i tried was client.accountLimitations.limited, but it always gets a undefined or null result. Sorry for the bother and noob questions :v Thanks for taking the time to read my problem. Have a great day.
  17. Is there a way to fetch certain data like the Steam Profile Name and Steam Avatar, if the Profile is Public, Steam Level, Ability to Invite Friends etc. and fetch it from Steam via Steam-User or is that something I would have to do without Steam-User via Steam Web API?
  18. in function process(Offer) { I wanted to add stock limit and current stock to my steam trading bot but I lack the knowledge. Simply I want my bot to be able to stop accept trade offer after current stock exceed stock limit, how do I do so.Bot.txt Help would be gladly appreciated, thank you.
  19. Hi, well..Good day, i'm Rami and i'm using; Nodejs: 10.16.3 steam-totp: 2.1.1 steam-tradeoffer-manager: 2.10.1 steam-user: 4.12.4 steamcommunity: 3.41.1 The thing is, i get error 429, A LOT. I know that 429 is what you get when you pass the ratelimit, and send too many request, BUT, hear me please. [01:34:33] - [Bot] Error polling for trade offers: Error: HTTP error 429 [01:34:43] - [Bot] Error polling for trade offers: Error: HTTP error 429 [01:35:15] - [Bot] Error polling for trade offers: Error: HTTP error 429 [01:35:25] - [Bot] Error polling for trade offers: Error: HTTP error 429 [01:35:36] - [Bot] Error polling for trade offers: Error: HTTP error 429 [01:35:46] - [Bot] Error polling for trade offers: Error: HTTP error 429 [01:36:08] - [Bot] Error polling for trade offers: Error: HTTP error 429 [01:38:03] - [Bot] Error polling for trade offers: Error: HTTP error 429 [01:38:13] - [Bot] Error polling for trade offers: Error: HTTP error 429 [01:39:17] - [Bot] Error polling for trade offers: Error: HTTP error 429 And goes on... i just cut it there cuz i was afraid of some type of vac xD. const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const SteamCommunity = require('steamcommunity'); const TradeOfferManager = require('steam-tradeoffer-manager'); const Config = require('./Util/Config'); let bot = new SteamUser(); let social = new SteamCommunity(); let manager = new TradeOfferManager({ steam: bot, language: 'en', pollInterval: 10000, cancelTime: 900000 }); let logOnOptions = { accountName: Config.accountName, password: Config.password, twoFactorCode: SteamTotp.getAuthCode(Config.sharedSecret), }; bot.logOn(logOnOptions); bot.on('loggedOn',() =>{ console.log('Working!'); bot.setPersona(SteamUser.EPersonaState.Online); }); bot.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); return; } console.log("Api is Ok"); }); social.setCookies(cookies); }); manager.on('pollFailure', function (err) { console.log("Error polling for trade offers: "+err); }); 1) I deleted the old made Api just in case, and i'm using a new one. 2) It's only this bot (1). 3)And i'm only logged in the acc, accessing with nodejs. 4) The bot is on stand by, not geting any trades, just runing that few lines, and get's 429. 5) I got the Shared Secret and Identity Secret from SDA, but from those i keep geting that there where clock problems, and could never get the code to make trades with it, so i downloaded WinAuth, and got new SS and IS, that even atomatically login with no need to manually put the code, like i needed to do with the SS and IS from SDA, so i'm using those of WinAuth. 6) I changed the PollInterval to 20,000, but even like that i keep geting the 429. From all my code, i was // or /* and */ diferents blocks of it, but it's does it nonetheless, and only goes away if i remove the "webSession", even if i only run the showed code, but that obviusly is not a fix. Can it be a problem caused by SDA?, i already unchecked all the options in SDA of regular checks or automatics responses, and i already erased WinAuth, but i didnt delete SDA mobile ver, and put the mail ver back cuz i don't want to lose a week of test if possible. I already read everything I found, but there was no actual fix, or i don't know that much, or maybe understod what it sayd.. For what i have read, it's pretty clear that there is very few one can do to fix it, and maybe the problem is just steam, but i'm asking just in case, maybe i I misunderstood something, and did something wrong. Is the code OK?. Is Steam fault, and i should not mind, or there is something i can try to not have that error?. Can it be the SS and IS that are in some way problematic? There is a fix, or there is only a limitation implementation to not get vac'ed? It's been 2 days since my last sleep lol, so i apologise in case i made a mistake or something sounds out of place. Have a grat day, and even if you cant help me, if you are reading this, thank you for your time. Rami.
  20. Sometimes pollFailure event is emitted and gives the error below. { Error: socket hang up at createHangUpError (_http_client.js:323:15) at TLSSocket.socketOnEnd (_http_client.js:426:23) at TLSSocket.emit (events.js:203:15) at endReadableNT (_stream_readable.js:1145:12) at process._tickCallback (internal/process/next_tick.js:63:19) code: 'ECONNRESET' } My script is running on AWS. So there shouldn't be any issues with the network.
  21. const manager = new TradeOfferManager({ steam: client, community: community, language: "en"}); manager.on("sentOfferChanged ", function (offer,oldState) { console.log(`Sent offer changed:` + offer.state);}); sentOfferChanged doesnt emit, the only time it emits something is when I send an offer that needs to be confirmed (ETradeOfferState = 9). Do I have to call doPoll() manually or Iam missing something?
  22. How do i check if a group is joinable or invite only?
  23. Hi, I have a little question: Where can i get shared_secret? After the first run steam.login(), I got "steamguard". Which passed to the function generateAuthCode.What am I doing wrong? Thank you. var SteamCommunity = require('steamcommunity'); var steam = new SteamCommunity(); var logOnOptions = { accountName: 'user1', password: 'passsssssssword',// twoFactorCode: '72N37', twoFactorCode: SteamTotp.generateAuthCode('76561198035130610||snip') }; console.log(logOnOptions) //logs in via browser steam.login(logOnOptions, function(err, sessionID, cookies, steamguard) { console.log(steamguard) // '76561198035130610||snip' if (err) { console.log("There was an error logging in! Error details: " + err.message); process.exit(1); //terminates program } else { console.log("Successfully logged in as " + logOnOptions.accountName); } });
  24. I wanna make a bot wich responds randomly when the user typer !random, i have created a array with the example: var random = ["random","blabla","bla"] So i added the function: function random_sentences(random) { return random[Math.floor(Math.random()*random.length)];} and if anyones type !random: else if(message == "!random") { client.chatMessage(random_sentences(random)) } this error appears: throw new Error("Unknown SteamID input format \"" + input + "\""); ^ Error: Unknown SteamID input format I did like to know how the bot can reponse randomly.Thanks
×
×
  • Create New...