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. client.gamesPlayed does not play the first entry of the array. let string = "string here"; let stringed = string.toSting(); // to make sure it is really a string var games = [stringed, 730,......] client.gamesPlayed(games) and yet it onlines with CSGO.
  2. I get a number of different errors when running the bot and they are always to do with the offers. This is what I have so far with the new offer for a stranger and the owner offer stuff. Just to let anyone know this bot sells TF2 Scrap for Steam Emoticons. The Code: manager.on('newOffer', (offer) => { let counter = 0 if (offer.itemsToGive.length == offer.itemsToReceive.length) { for (let i = 0; i < offer.itemsToGive.length; i++) { if (offer.itemsToReceive[i].type.includes("Emoticon") && offer.itemsToGive[i].name == "Scrap Metal") { counter++ } } if (counter == offer.itemsToGive.length) { offer.accept(function(err, status) { if (err) { console.log("Unable to accept offer: " + err.message); } else { console.log("Offer accepted: " + status); if (status == "pending") { community.acceptConfirmationForObject(config.identity, offer.id, function(err) { if (err) { console.log("Can't confirm trade offer: " + err.message); } else { console.log("Trade offer " + offer.id + " confirmed"); } }) } } }) } } 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).'); } }); } }); //owner send trade, bot instantly accepts manager.on('newOffer', (offer) => { if (offer.partner.getSteamID64() === config.ownerID) { acceptOffer(offer); console.log("Successfully accepted") } else { delcineOffer(offer); } }); Some examples of errors I get, "Cannot read property 'partner' of undefined" that error is from the owner code. Then when removing that code the bot works, but it means I cannot send trades as the owner with out logging onto the bot's account and accepting it manually. I hope someone can help me. Thanks Unmet
  3. 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
  4. Hello, I've been recently trying to use steam-user to login, and fetch an auth session ticket. After converting the result of the function into hexadecimal and trying to authenticate through steam, I get an "Invalid ticket' error from steam. Any ideas on what I could be screwing up on?
  5. 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})); });
  6. Can I change my steam url ex. https://steamcommunity.com/id/{user}/with this application?
  7. 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.
  8. 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.
  9. 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 ?
  10. client.getTradeURL(function(err, details) { if(err) return console.log("error: " + err); console.log(badvar); });log: error: ReferenceError: badvar is not defined
  11. 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; } } } })
  12. 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
  13. 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
  14. 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?
  15. user.on('error', function(e) { log(username, "error: " + JSON.stringify(e)); log(username, e);}); Sometimes returns "{}" log:[y6p123] error: {}[y6p123] } Why?
  16. 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')}})}}});}});
  17. Is it possible to send image to friend with sendChatMessage? If yes which format it should be? Can i send a buffer?
  18. 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.
  19. 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 ?
  20. What should I change and edit in a script that a level up bot would accept foil sets? Thanks for responded and help.
  21. 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?
  22. 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....
  23. 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.
×
×
  • Create New...