Jump to content
McKay Development

Search the Community

Showing results for tags 'question'.

  • 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
    • node-steam-session

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

  1. Hello, im trying to handle an InvalidPassword error. const login = (username, password) => { const logOnOptions = { accountName: username, password: password } try{ client.logOn(logOnOptions); } catch(err) { console.log("Can't find the account. Please double check it."); } } login(argum, password); But instead of showing "Can't find the account..." etc, it shows that events.js:174 throw er; // Unhandled 'error' event ^ Error: InvalidPassword at SteamUser.<anonymous> (/home/tanjil/projects/nodejs-projects/steam-farm/node_modules/steam-user/components/logon.js:494:16) at handlers.forEach (/home/tanjil/projects/nodejs-projects/steam-farm/node_modules/steam-user/components/classes/HandlerManager.js:37:12) at Array.forEach (<anonymous>) etc...
  2. Hi everybody, I i'm trying to post artwork using bot. Was searching for how to do it but found nothing. Is there any way of doing it? Thanks
  3. I set some sessionExpired function, that reconnect the bot to steam when its expired. But when it expires, it reconnect the bot multiple times. The command below send about 20 messages that theres an error, and the error is fixed. Also in console it looks like (picture). Does anyone know wheres the problem ? community.on("sessionExpired", function(err) { client.channels.cache.get("753653286283903126").send('<:false:750799883572609245> **There was an error, fixing the error... <:repairing:755511536423927909>**') .then(sentMessage => sentMessage.delete({ timeout: 4000 })) .catch(console.error) client.channels.cache.get("753653286283903126").send('<:true:750799921497505913> **Error is fixed, you can try again !**') .then(sentMessage => sentMessage.delete({ timeout: 4500 })) .catch(console.error) client.channels.cache.get("753653286283903126").updateOverwrite(message.guild.roles.everyone, { SEND_MESSAGES: true }) .then(channel => console.log('Channel unmute')) .catch(console.error); if (client2.steamID == undefined) { client2.logOn(logInOptions); client2.on('loggedOn', () => { console.log('Steam Bot is running !'); client2.setPersona(SteamUser.EPersonaState.Online); client2.gamesPlayed(440); }); } else { client2.webLogOn(); //relogin to Steam or refresh tradeoffer-manager cookies } //add your handling code here, for example: if (sendofferError == true){ //do stuff } })
  4. I there any code/function to detect last accepted offer and say what was opponents trade link ??? The reason why do I need it is because when 2 different users got offers, and 1 of them accepts the trade, bot doesnt know who confirmed, (but registered that someone confirmed) so bot sends them both message like "Success trade confirmed "
  5. I have copied this code and need help what i need to change to make it work... Items that bot is requiring opponent has, so the item is existing and if the guy doesnt have the item, console says that. I got this error and dont know why.. . the script is here if(isNaN(amount) || amount === undefined){ console.log('invalid number'); } else{ var count = 0; var i = 0; console.log("Creating Offer, please wait!"); //Check Players inventory for the keys, and make sure we have enough sets to supply var offer = manager.createOffer(_message); offer.getPartnerInventoryContents(440, 2, function(err, inventory, currencies){ if(err){ console.log(err); } var a = []; for(var i = 0; i < inventory.length; ++i){ if(inventory.market_hash_name == 'Refined Metal' && a.length < amount){ console.log("Adding Item"); a.push(inventory.id); offer.addTheirItem({id: inventory.id, appid: 440, contextid: 2}); console.log("Length of a "+a.length); console.log(a); ++count; } } inventory.forEach(function(val){ if(val.market_hash_name == 'Refined Metal'){ console.log("Adding Item"); offer.addTheirItem({id: val.instanceid, appid: 440, contextid: 2}); ++count; } }); if(count < amount){ console.log("count: "+count); console.log("You don't have enough keys for me to send this trade."); } else{ offer.send(function(err, status){ if(err){ console.log(err); console.log("An Error has Occured while sending offer."); } if(status == "pending"){ console.log("Confirming Offer!"); } if(status == "sent"){ console.log("Offer Sent!"); } }); } }); }
  6. Hey I wanted to create a bot that farms hours on a few games and if I (player) start let's say CS:GO. The bot will give an error: Logged into Steam Boosting our hours on chosen games ... Set state to Snooze // starting CS:GO here { Error: LoggedInElsewhere at SteamUser._handleLogOff (C:\Users\Admin\node_modules\steam-user\components\logon.js:400:11) at SteamUser._handlers.(anonymous function) (C:\Users\Admin\node_modules\steam-user\components\logon.js:380:7) at SteamUser._handleMessage (C:\Users\Admin\node_modules\steam-user\components\messages.js:235:30) at emitThree (events.js:136:13) at CMClient.emit (events.js:217:7) at CMClient._netMsgReceived (C:\Users\Admin\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:323:8) at CMClient.handlers.(anonymous function) (C:\Users\Admin\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:603:8) at CMClient._netMsgReceived (C:\Users\Admin\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:305:24) at emitOne (events.js:116:13) at TCPConnection.emit (events.js:211:7) eresult: 6 } This is the bot's code: var colors = require("colors"); const SteamUser = require("steam-user"); const client = new SteamUser(); const logOnOptions = { accountName: "u", password: "p", }; autoRelogin = true; //correct? client.logOn(logOnOptions); client.on("loggedOn", () => { console.log("Logged into Steam".green); client.gamesPlayed(["Boosting Hours", 20, 70, 50, 9480, 300, 40, 130, 10, 730]); console.log("Boosting our hours on chosen games ...".yellow); client.setPersona(SteamUser.Steam.EPersonaState.Snooze); console.log("Set state to Snooze".blue); }); client.on('error', function (err) { console.log(err); client.gamesPlayed(["Boosting Hours", 20, 70, 50, 9480, 300, 40, 130, 10, 730]); }); I'm not sure if I need to use the autoRelogin boolean. I do know I need to handle the error. Not sure how to. So my thought now was to just add the gamesPlayed function again to start those games when the errors appear. But my thought of creating the bot was: // Farm bot 1. Log in on the account 2. Run a check if the account is already playing game(s) (with interval, so it constantly checks) 3. If it is playing a game -> do nothing 4. If it is not playing any games -> start idling a list of games 5. Also handle the LoggedInElsewhere? I'm learning C++ atm. And this is how I start my projects. Writing down what I want my program to do. And turn the text into code. I just can't with JS. Simply because I don't understand the language that well. Trust me, I don't like being spoonfed but I just can't code from scratch with JS. If anyone is planning to spoonfeed me. Do know I'd love some explaination. Otherwise I cannot learn from it. Best regards Ruben.
  7. 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!
  8. 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); });
  9. 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.
  10. 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!
  11. 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...
  12. 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
  13. How to comment on the drawing showcase and screenshot and how do I like it?
  14. 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.
  15. Hello, when someone sends a trading offer to the boat. Unknown Command sends message How can I exclude this
  16. 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.
  17. 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.
  18. 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
  19. 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.
  20. 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?
  21. 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.
  22. 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.
  23. 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.
×
×
  • Create New...