Jump to content
McKay Development

Search the Community

Showing results for tags 'node.js'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start



Website URL




Found 1387 results

  1. Why is this node module so much lag? When I type command it takes my bot slower than usual to reply, like 3/4th of a second, even when I see other bots on steam reply in like a tenth of a second. My bot isn't even that complicated and i'm running it on a pretty powerful computer. Is there anything else that I might be do wrong or is this what i get for using a legacy module
  2. I would like to create a function that returns the getOffers object.when ever I console.log my loadTrades function i get undefined. I am new to coding especially aysnc. how could i write this better? const loadTrades = function(callback){ manager.getOffers('ActiveOnly',(err,received)=>{ if(err){ console.log(err) } else { callback(received); } });} manager.on('newOffer',()=>{ // expecting to console log the getOffers object console.log(loadTrades((received)=>{return received})); });
  3. So I want to create a very simple discord bot. I already have it running except I cannot figure out how to integrate this library properly. I want the bot to simply retrieve the amount of players on a certain steam game and then return the amount of players. Here's my code so far: const SteamUser = require('./node-steam-user-master/index.js');var user = new SteamUser(); user.login({"accountName": "","password": ""}); user.on('loggedOn', function(details){console.log(user.steamID);}) I will also note I have been getting an error when I try to run this code (I do have the accountName and password fields filled in on my actual program) This is the error I get: ---------------------------------------------------------------------------------------------------------------------- internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module '@doctormckay/stats-reporter' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (D:\Discord_Code\bot\node-steam-user-master\index.js:1:1) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3)---------------------------------------------------------------------------------------------------------------------- So that's my first problem, but the other is how do I use the getPlayerCount Method? I'm assuming I need to use a different constructor because the SteamUser doesn't seem to have that method available. Any help would be appreciated, thanks.
  4. Can I change my steam url ex. https://steamcommunity.com/id/{user}/with this application?
  5. Hey, I have been trying to fiddle around with the GC for CSGO a bit but noticed that the callback in "sendToGC" never runs. The event works fine but the callback never happens. const SteamUser = require("steam-user"); const user = new SteamUser(); user.logOn({ accountName: "Account", password: "Password" }); user.on("loggedOn", () => { console.log("Logged in"); user.gamesPlayed(730); }); user.on("appLaunched", (appID) => { setInterval(() => { console.log("Attempting hello for " + appID); user.sendToGC(appID, 4006, {}, Buffer.alloc(0), (appID, msgType, payload) => { console.log("Got " + msgType + " from callback"); }); }, 3000); }); user.on("receivedFromGC", (appID, msgType, payload) => { console.log("Got " + msgType + " from event"); }); Above is example code which I am trying to run, everything I get is "Got 4004 from event" but never from the callback. I noticed that the "++this._currentGCJobID" in "components/gamecoordinator.js" always returns NaN, maybe that helps somehow. I am unsure but I might also just be doing something wrong.
  6. client.on('friendRelationship', (sid, relationship) => {if(relationship == SteamUser.EFriendRelationship.RequestRecipient) {console.log(`Friend request from: ${sid.getSteamID64()}`)console.log(`Checking if ${sid.getSteamID64()} is scammer.`)rep.isScammer(sid.getSteamID64(), function(error, result) {if(error) {console.log(error);} else {if(result) {console.log(`Declining friend request, ${sid.getSteamID64()} is a scammer.`);client.removeFriend(sid)} else {console.log(`Accepting friend request, ${sid.getSteamID64()} is not a scammer.`);community.getSteamUser(sid, (err, user) => {if(err) {console.error(err)} else {user.comment('test')}})}}});}});
  7. Hey, i will get my Inventory History and specific my CSGO Knife History. i see this is now a part of node-steamcommunity, but i dont know how i get this. My coding in node (javascript) is not so good for this Moment. I learn it now. Have anyone a code snippet for me? Or a good manuell for this how i can solve this? Special Thanks in advance I try it with let Inv = []; community.getHistory(client.steamID,function(err, user){ if (err) { console.log(err); } else { console.log(user.Inv); } }); But its not working and it is rly bad code i think ?
  8. Sorry to bother anyone on Christmas but I'm trying to send comments to user profiles. community.postUserComment("steam id", "hello", function (err) { console.log(err); }); But it keeps returning the error: Error: The settings on this account do not allow you to add comments. I've tried this on multiple accounts all of which have comments enabled, even tried on my own (bots) profile, still no luck. Any help would be greatly appreciated!
  9. 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; } } } })
  10. client.getTradeURL(function(err, details) { if(err) return console.log("error: " + err); console.log(badvar); });log: error: ReferenceError: badvar is not defined
  11. 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
  12. 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
  13. 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?
  14. user.on('error', function(e) { log(username, "error: " + JSON.stringify(e)); log(username, e);}); Sometimes returns "{}" log:[y6p123] error: {}[y6p123] } Why?
  15. Is it possible to send image to friend with sendChatMessage? If yes which format it should be? Can i send a buffer?
  16. 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.
  17. 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 ?
  18. What should I change and edit in a script that a level up bot would accept foil sets? Thanks for responded and help.
  19. 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....
  20. 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?
  21. 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.
  22. 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.)
  23. 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); } }); });
  • Create New...