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. Today authorization via steam-user stopped working for me. I do not know why. I changed my authorization to the community module. All my bots have different proxies. But, if I start authorizing several bots at once, then steam throws out a message about a large number of login attempts. What could be the reason for this? What can linked different instances? I am passing to tradeofferManager instance steam-user and steamcommunity. But I log in with steamcommunity.
  2. Hi! I am using steam-user v4.18.0 and using getProductInfo method. For some games there exists release_date, steam_release_date and for some games I can't find any indication about when this game was released. Do you have some advice for me how to reliably get game's release date? Maybe I should use some other method? For example these IDs don't have release date 203160, 221380, 236850, 365590, 220240. But for example CS: GO (id 730) has steam_release_date. Let me know if there is some additional info that I can provide. Thanks!
  3. //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.
  4. 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...
  5. 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
  6. 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 } })
  7. 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 "
  8. 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!"); } }); } }); }
  9. 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.
  10. 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!
  11. 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); });
  12. 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.
  13. 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!
  14. 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...
  15. 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
  16. How to comment on the drawing showcase and screenshot and how do I like it?
  17. 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.
  18. Hello, when someone sends a trading offer to the boat. Unknown Command sends message How can I exclude this
  19. 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.
  20. 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.
  21. 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
  22. 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.
  23. 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?
×
×
  • Create New...