Jump to content
McKay Development

Search the Community

Showing results for tags 'node.js'.

  • 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. I have the function below which gets an item id by calling the inventory, then seeing which item's name is correct and then returns the id, however when i return the ID, it does not show correctly: it shows undefined. I have tried both .assetid and .id But when i put in the function console.log(inventory.assetid) it logs the id, but when i call the function it doesnt return the id! Please halp thank you function getID(itemname) { manager.getInventoryContents(440, 2 , true, function(err, inventory) { if (err) { console.log(err) return; } else { //console.log(inventory); for (var i = 0; i < inventory.length; i++) { if (inventory.market_hash_name === itemname) { return inventory.id; } } } })
  2. client.getTradeURL(function(err, details) { if(err) return console.log("error: " + err); console.log(badvar); });log: error: ReferenceError: badvar is not defined
  3. Hey, i have a Problem in a function from my BOT I become a warning: (node:21607) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 friendRelationship listeners added. Use emitter.setMaxListeners() to increase limit I need to use emitter.setMaxListeners(), but i dont know how to use it
  4. Hey! I am trying to add a feature for a client that requires retrive info of last trades made by bot. My question is: Anyone knows what is the rate limit of send a message to person? I didn't find anything in docs. I tried 100 ms of delay beetween each msg but still getting rate limit exceeded. Thanks in advance
  5. Error: Descriptions: Invalid API response at Helpers.checkNeededDescriptions (F:\apps\WPB\bots\node_modules\steam-tradeoffer-manager\lib\index.js:497:14) at Async.map (F:\apps\WPB\bots\node_modules\steam-tradeoffer-manager\lib\assets.js:166:5) at F:\apps\WPB\bots\node_modules\async\dist\async.js:1126:9 at F:\apps\WPB\bots\node_modules\async\dist\async.js:473:16 at iteratorCallback (F:\apps\WPB\bots\node_modules\async\dist\async.js:1048:13) at F:\apps\WPB\bots\node_modules\async\dist\async.js:958:16 at F:\apps\WPB\bots\node_modules\async\dist\async.js:1123:13 at Async.each (F:\apps\WPB\bots\node_modules\steam-tradeoffer-manager\lib\assets.js:159:6) at F:\apps\WPB\bots\node_modules\async\dist\async.js:473:16 at iteratorCallback (F:\apps\WPB\bots\node_modules\async\dist\async.js:1048:13) My bots was worked perfectly until a few minutes ago. This new error happen each time the try to poll the data. And I get "ServiceUnavailable" message when I am trying to make a trade. But Steam status is ok: Some idea?
  6. user.on('error', function(e) { log(username, "error: " + JSON.stringify(e)); log(username, e);}); Sometimes returns "{}" log:[y6p123] error: {}[y6p123] } Why?
  7. Is it possible to send image to friend with sendChatMessage? If yes which format it should be? Can i send a buffer?
  8. Hi, I wonder if it is possible to get market item name and image url by market listing id from confirmation, I wonder how does mobile steam app creating its list of confirmations where you can see thumbnails and names of items on confirmations list.
  9. Is there a number limit where Steam gives no card information at the receipt page ? I sent a trade for 430 items today and after it is accepted, i went to receipt url, This is the page; How can i get new assetid's in this situation ?
  10. What should I change and edit in a script that a level up bot would accept foil sets? Thanks for responded and help.
  11. Hey iam working on a GameBot. Example: someone want a Gamepackage, it cost 2 TF2 Keys. I sent the TradePartner an offer with 2 Keys from his Inventory. Here is my Code: function GetItems(){ manager.getUserInventoryContents(TradePartnerSteamID64, 440, 2, true, (err, inv) => { if (err) { console.log(err); } else { var Volume = 2; // Get X Amount of Items // Filter out all var Keys = inv.filter(function(item) { return item.market_hash_name.match('Mann Co. Supply Crate Key') }); // Check if TradePartner have enough Keys if(Keys.length < Volume) { console.log('Not enough Mann Co. Supply Crate Keys'); return true; } // Start a new TradeOffer var offer = manager.createOffer(TradePartnerSteamID64); // Add the Items to TradeOffer console.log('Adding ' + Volume + ' Mann Co. Supply Crate Key'); offer.addTheirItems(Keys.slice(0, Volume)) // Send the TradeOffer offer.send(function(err, status) { if(err) { console.log(err); } else if(status == 'pending') { community.acceptConfirmationForObject(Config.IDENTITYSECRET, offer.id, function(err) { if(err) { console.log(err); } else { console.log("TradeOffer confirmed"); } }); } else { console.log('TradeOffer sent successfully'); } }); } }); }; ...ok that works. But how can i check if the Trade decline, finish or Items changed by TradePartner? Like: If trade done sent GameCodes If trade decline do anything If trade changed kick him i his ass Iam newbie in node, pls help me. Thx in advance....
  12. I have a lot of bots and I can receive a new trade. I can decline it, but if I try to create new offer, I get error: Error: Not logged in Then, if I try to make webLogOn, I receive: Error: Cannot log onto steamcommunity.com without first being connected to Steam network When I try to make relog I receive TypeError: Cannot read property 'type' of null at SteamUser.relog What should I do to fix this?
  13. I have noticed for a long time that my application consumes too much memory: 1500-4000mb. Today I tried to find the reason. I just turned off different parts of the code to check. client.on("webSession", (sessionID, cookies) => { /////////////// //if (1==2) { ///////////// manager.setCookies(cookies, (ERR) => { if (ERR) { console.log($error, currentTime() + " [ ACCOUNT ] [ LOGIN ] An error occurred while setting cookies: " + ERR); } else { console.log(currentTime() + " [ ACCOUNT ] [ LOGIN ] Websession created and cookies set"); } }); /////// //} /////// community.setCookies(cookies); community.startConfirmationChecker($SECOND * 10, CONFIG.IDENTITYSECRET); // .... }); When I turned off manager.setCookies i saw it: start WITHOUT -- manager.setCookies: 23:22 [ DEBUG ] [ INVENTORY ] Loading inventory for checking cardsets... 23:23 : 197.4921875(process.memoryUsage().rss / 1048576) 23:23 [ DEBUG ] [ INVENTORY ] Cardsets loaded: 3438/1433 23:23 : 253.53125(process.memoryUsage().rss / 1048576) 23:23 : 253.6640625(process.memoryUsage().rss / 1048576) 23:23 : 254.43359375(process.memoryUsage().rss / 1048576) 23:23 : 255.1875(process.memoryUsage().rss / 1048576) 23:23 : 255.84765625(process.memoryUsage().rss / 1048576) 23:24 : 256.328125(process.memoryUsage().rss / 1048576) 23:24 : 257.1953125(process.memoryUsage().rss / 1048576) 23:24 : 257.22265625(process.memoryUsage().rss / 1048576) 23:24 : 257.9453125(process.memoryUsage().rss / 1048576) 23:24 [ DEBUG ] [ INVENTORY ] Loading inventory for checking keys amount... 23:24 : 213.578125(process.memoryUsage().rss / 1048576) 23:24 : 216.2734375(process.memoryUsage().rss / 1048576) 23:25 : 220.11328125(process.memoryUsage().rss / 1048576) 23:25 : 220.46484375(process.memoryUsage().rss / 1048576) 23:25 : 228.640625(process.memoryUsage().rss / 1048576) 23:25 : 228.11328125(process.memoryUsage().rss / 1048576) 23:25 : 229.203125(process.memoryUsage().rss / 1048576) 23:25 : 229.60546875(process.memoryUsage().rss / 1048576) 23:26 : 229.84765625(process.memoryUsage().rss / 1048576) 23:26 [ MESSAGE ] [ ................. ] abcd 23:26 : 229.09765625(process.memoryUsage().rss / 1048576) 23:26 : 181.03125(process.memoryUsage().rss / 1048576) 23:26 : 181.59765625(process.memoryUsage().rss / 1048576) start WITH -- manager.setCookies: 23:28 [ DEBUG ] [ INVENTORY ] Loading inventory for checking cardsets... 23:28 : 185.8125(process.memoryUsage().rss / 1048576) 23:28 [ DEBUG ] [ INVENTORY ] Cardsets loaded: 3438/1433 23:28 : 290.54296875(process.memoryUsage().rss / 1048576) 23:28 : 1303.80078125(process.memoryUsage().rss / 1048576) 23:28 : 1290.59375(process.memoryUsage().rss / 1048576) 23:29 : 1283.73828125(process.memoryUsage().rss / 1048576) 23:29 : 1262.2578125(process.memoryUsage().rss / 1048576) 23:29 : 897.84375(process.memoryUsage().rss / 1048576) 23:29 : 873.96484375(process.memoryUsage().rss / 1048576) 23:30 : 1661.671875(process.memoryUsage().rss / 1048576) 23:30 [ DEBUG ] [ INVENTORY ] Loading inventory for checking keys amount... 23:30 : 1653.04296875(process.memoryUsage().rss / 1048576) 23:30 : 1659.85546875(process.memoryUsage().rss / 1048576) 23:30 : 1663.953125(process.memoryUsage().rss / 1048576) 23:30 : 1674.36328125(process.memoryUsage().rss / 1048576) 23:30 : 1705.48046875(process.memoryUsage().rss / 1048576) 23:31 : 1715.796875(process.memoryUsage().rss / 1048576) 23:31 [ MESSAGE ] [ . . . ] asdf 23:31 : 1695.4921875(process.memoryUsage().rss / 1048576) 23:31 : 1709.73046875(process.memoryUsage().rss / 1048576) I also noticed that my folder 'pool_data' has a size about 40mb / 40 000 files (I don't know if this is normal or not) I would like to know where I can continue to look for the error to reduce memory usage.
  14. Hello there. I was surfing internet about Steam cookies because I saw a video on YT, where they have shown how to use GIFS as an avatar. However, it looks like my luck wasn't good to get script/program working. I just need SteamLogin in order to get things work, but I didn't find it. Will SteamLoginSecure work the same as that cookie? (Sorry for such post because I'm one of those unintellectual people that ask for help.) I will leave a link down here v. (Video isn't mine.)
  15. Hey, so I have 2 bots trading items back to back Bot #1 takes 30 seconds to confirm a trade while Bot #2 takes 5 seconds What I want to happen is to minimize the time it takes to accept trades on Bot #1 Here's my constructor let client = new SteamUser(), manager = new TradeOfferManager({ "language": 'en', "steam": client, "pollInterval": "5000", "cancelTime": "1800000" }), community = new SteamCommunity(); // Bot #2 let client2 = new SteamUser(), manager2 = new TradeOfferManager({ "language": 'en', "steam": client2, "pollInterval": "5000", "cancelTime": "1800000" }), community2 = new SteamCommunity(); Any Ideas why the difference is so high between these 2 bots? They're pretty much using the same code across the script Also pollInterval is 5s in both.. Also for question #2: Is it okay to use this event for confirmations? community.on("newConfirmation", (CONF) => { community.acceptConfirmationForObject(CONFIG.Bot1.IDENTITYSECRET, CONF.id, (ERR) => { if (ERR) { console.log("## An error occurred while accepting confirmation: " + ERR); } }); });
  16. Hi. I was trying to get group's members list by calling "getGroups" and I was expecting to have A Chat Room Group State object in response, which in turn should contain members - An array of Chat Room Member but all I got was "User Chat Room Group State". group_state: { user_chat_room_state: [Array], chat_group_id: '4817935', time_joined: 2019-03-12T22:26:00.000Z, desktop_notification_level: 0, mobile_notification_level: 0, time_last_group_ack: 2019-05-01T12:09:46.000Z, unread_indicator_muted: false } } ] So, I just don't know but something is wrong here. If it's the DOC wrong, how am I supposed to get members list apart from "joinGroup"? Thanks as always.
  17. Where can I read the documentation about client.changeEmail
  18. The line that the error pops up : manager.getUserInventoryContents('76561198083528564', 440, 2, true, function (error, inventory) { console.log(inventory.length); for(let l = 0 ; l < inventory.length; l++) { if(inventory[l].market_hash_name == prices[i].name) itemid = inventory[l].assetid; } }) Error:
  19. Hello mates! This might be a weird question, but I'm having trouble getting "client.getPersonas" to function in a module.export. Here is my file my problem is located in: (Problem is in the exports.GetSteamName) var exports = module.exports = {}; var SteamUser = require('steam-user'); var client = new SteamUser(); const SteamRepAPI = require('steamrep'); exports.CheckRep = function (SteamId64) { return new Promise(resolve => { SteamRepAPI.isScammer(SteamId64, function (err, result) { if (err) { console.log("Error Checking SteamREP for " + SteamId64); resolve(true); // true == Not a scammer } else { if (result) { console.log("eww thats gross") resolve(false); } else { console.log("Got Not-Scammer!") resolve(true); // true == Not a scammer } } }); }) } exports.GetSteamName = function (SteamID) { return new Promise(resolve => { client.getPersonas([SteamID], function (personas) { persona = personas[SteamID.getSteamID64()]; name = persona ? persona.player_name : ("[" + SteamID.getSteamID64() + "]"); resolve(name) }) }) } What happens is once the program gets to"client.getPersonas([steamID], function (personas) {" , it seems to run over everything inside of the function(personas). Including the "resolve" If I were to change exports.GetSteamName to: exports.GetSteamName = function (SteamID) { return new Promise(resolve => { client.getPersonas([SteamID], function (personas) { persona = personas[SteamID.getSteamID64()]; name = persona ? persona.player_name : ("[" + SteamID.getSteamID64() + "]"); resolve(name) }) console.log("Fired?") }) } I will get back "Fired?" in console. The problem is present in another file I am using for Chat messages.The problem is not present in "CheckRep". This could just be me not understanding how module.exports works exactly as this is still a somewhat new concept for me.CheckRep, however, works as expected and that's what I'm getting caught up on. I think it could be that "SteamUser" and "client" are being called more than expected (I'm declaring them in multiple files).SteamRepAPI is only declared in this file. I have resorted to moving the function into the main file, which works as expected. I would greatly prefer it to function in this file. Taken from package.json:"steam-user": "^3.28.2", Any help is greatly appreciated, Thanks!
  20. Hi, in my bot.config I have a masterclangroup ID64 set up so that my bot can join it. What I'd like to know is if it's necessary to have the bot joining at every boot and why? Secondly, is there a way to check if the bot has already joined my group and skip that process or is it unnecessary? Thanks
  21. Hello My BoT is in a couple group chat rooms and is catching all messages starting with "!" in order to execute commands. I have an issue every time someone joins the chat room and Steam displays this: BoT returns: UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of null I thought that "messages" and server_messages were 2 different items, so why the error when my code is: function parseMessage(groupID, chatID, message, senderID, senderAccountID, sender) { if (message && !message.startsWith('!')) { return; } Isn't the "joined" stuff a server message? How do I get rid of the error? Thanks as always
  22. I'm trying to login using node-steam-user with accountName and loginKey I have arround 20 accs. 90% of them throw Error: InvalidPassword and only few may be 'Logged into Steam'. But after each login I save new loginKey. What is a problem there? Is there a way to login at steam account again after server restarts? (without 2fa)
  23. v4 is now out! There are a lot of breaking changes in v4. See the release notes on GitHub for all of the changes. Major changes include: Support for new Steam chatPromise support for all methods that take callbacks (callbacks are still also supported)Removal of deprecated methodsAddition of err parameter to all callbacks that previously lacked itNode.js v8 or higher is now required
  24. Hi Even though my BoT is addressing me with "@roughnecks" in group chat, I don't get highlighted. Any way to make this work? Thanks
  25. Hello. I'm trying to join a group of mine but I have issues with IDs. If I use <groupID64>number</groupID64> - taken from my group url after adding "/memberslistxml?xml=1" - in "chat.getClanChatGroupInfo" I get info about a group which isn't mine. Then if I try to join my group, either by using groupID64 or groupID I can read while editing my group on Steam ( http://i.imgur.com/zCUqOcd.png ) i get an eresult 10 (Busy). Can you clarify which ID is which and how do I get them? Thanks
×
×
  • Create New...