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. I am new in node js, i start 2 days ago. Is that possible to create multiple specific input message? steam chat a: hello bot: !mymoney, !checkname [gameid] a: !checkname 440 bot: Team Fortress 2 a: !checkname 570 bot: Dota 2 node.js code ..... client.on("friendMessage", function(steamID, message) { if (message == "!mymoney") { client.chatMessage(steamID, duitgw) } else if (message == "!checkname"){ if (message.line2 == "440"){ //like this ..... } else if (message.line2 == notnumber){ //another condition .... } else if (message.line2 == isnt set){ //another condition .... } } else{ client.chatMessage(steamID, "!mymoney, !checkgame [gameid]") } }); ..... edit: i use comment for highlight
  2. some user inventories are really big, and the module would be doing lots of requests to steam, so if only a single one request fails, it would have to start all over again, to have a few extra attempts to that specific request if we receive a mailformed response or a common http error would be realy cool
  3. This is my question, if somebody can help me I would be grateful!
  4. When working with your library there was a difficulty... How can i promise example here: botInfo = {}; client.logOn(logOnOptions); client.on('wallet', function(hasWallet, currency, balance) { botInfo.balance = balance; }); client.on('emailInfo', function(address, validated) { botInfo.emailAddress = address; botInfo.emailValidated = validated; }); console.log(botInfo); // i want to log data after fill info no one promise don't work....
  5. Hello, I have migrated from SteamKit to node-steam-user to be able to interface with the new steamchat. I had a chatbot that made heavy use of a 'group chat' in order to notify administrators of reports in-game (via a plugin) and provide them with all the info via steam without any other access needed (authorized via steamid, only 'members' can join chat group) I was interested in making use of the chatroom channels feature of the new steam groups to keep everything tidy, however looking over the methods available to me, this is not possible (or I am blind and didnt see it) are there any plans on adding a way to 'create a channel' in a steam group chat? Here is the flow of what I want to do, but currently it looks like there is no way for a bot to 'manipulate' the channels to make this possible. User submits report Bot sees new report in database, creates channel #report-$id Bot notifies online admins of #report-$id Admin(s) investigate report, close report after being handled. Bot closes/deletes channel after timestamp is 24h old.
  6. Guest

    event user not emitted

    Hi. Event "user" not emitted when you accepting friend invite using method client.addFriend, but emitted when user accepting your invite
  7. Hello, I'm new to Node.js progamming and I'm trying to make a Steam gifting bot, that would add people, buy the gift and send it to them. Is it possible to do it using only node-steam-user or do I need more packages? Any threads/tips/documentation would be appreciated.
  8. 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?
  9. Hi there, I'm using steam-user to try to make a bot, but I cannot get it to set it's status to online. Furthermore, is there a way to check if the login was successful as the loggedOn event appears to trigger even if I try entering bogus account details. Code is as follows: const SteamUser = require ("steam-user");const SteamTotp = require ("steam-totp");const config = require("./config"); const client = new SteamUser();const details = {accountName: config.accountName,password: config.password,twoFactorCode: SteamTotp.generateAuthCode("redacted"),rememberPassword: true}; client.logOn(details); client.on("loggedOn", () => {console.log("signed in");client.setPersona(1);})
  10. Hi all, I am trying to send a game invitation friend message using node-steam-user. I am using sendFriendMessage function with EChatEntryType option established as 3 (InviteGame value at https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EChatEntryType.js) const SteamUser = require('steam-user'); const client = new SteamUser(); client.chat.sendFriendMessage("steam64Id Here", '[lobbyinvite appid="App Game IdHere" lobbyid="Lobby Id Here"][/lobbyinvite]', {chatEntryType: 3});The result is that there is no invitation sent in steam chat I supposted to fill the message parameter like that because of im getting the lobbies invitation history chat in that format. I saw all node-steam-user docs and i did not found any tutorial or explain about how to use this function with EChatEntryType as InviteGame value. ¿how can i use this function to send a game lobby invitation message to a friend? ¿What data and would be the message parameter format in the function? Thanks in advance,
  11. I was doing some tests in one of my projects that use this module, and i noticed that de polling sometimes requests to much ram, after get further the module in github, the "problem", seems to be that to much information is cached in the LeastUsedCache(), this happens only when there is a that bot account has to many items i suppose.. so having that in mind, i have a question that can possibly lower the ram usage, what if we use a mongoDB or something alike to store that data intead(as an option to implement of course), this would only be useful in some cases like mine, but it might improve a little the ram usage, and also would be possible to store more data for more time if needed.. i could have did it myself and test it to see if is worth it, but i'd rather see you guys thoughts first, and also the possibility of this to be implemented in the module by the @Doctor himself, if the results seems to be good
  12. 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.
  13. I cant seem to find a craft-able property in the econ item object can someone point to it in this object bellow, thanks! EconItem {appid: 440, contextid: '2', assetid: '7846925808', classid: '11040732', instanceid: '11040552', amount: 1, missing: false, est_usd: '92', icon_url: 'fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEYeQocWAndqzBCjM31Mv6NGucF1Yps5MQEjDM6xlF5Y7uwMjQxIlfHVaEOXqNso1rpCnJmuZ5hUIaw8blIOVK4ag0bm_o', icon_url_large: 'fWFc82js0fmoRAP-qOIPu5THSWqfSmTELLqcUywGkijVjZULUrsm1j-9xgEYeQocWAndqzBCjM31Mv6NGucF1Yps5MQEjDM6xlF5Y7uwMjQxIlfHVaEOXqNso1rpCnJmuZ5hUIaw8blIOVK4ag0bm_o', icon_drag_url: '', name: 'Summer Shades', market_hash_name: 'Summer Shades', market_name: 'Summer Shades', name_color: '7D6D00', background_color: '3C352E', type: 'Limited Level 10 Glasses', tradable: true, marketable: true, commodity: false, market_tradable_restriction: 7, market_marketable_restriction: 0, fraudwarnings: [], descriptions: [ { type: 'text', value: 'These are famous.', app_data: '' } ], actions: [ { name: 'Item Wiki Page...', link: 'http://wiki.teamfortress.com/scripts/itemredirect.php?id=486&lang=en_US'}, { name: 'Inspect in Game...', link: 'steam://rungame/440/76561202255233023/+tf_econ_item_preview%20S%owner_steamid%A%assetid%D2327250644315844062' } ], market_actions: [ { name: 'Inspect in Game...', link: 'steam://rungame/440/76561202255233023/+tf_econ_item_preview%20M%listingid%A%assetid%D2327250644315844062' } ], tags: [ { internal_name: 'Unique', name: 'Unique', category: 'Quality', color: '7D6D00', category_name: 'Quality', localized_tag_name: 'Unique', localized_category_name: 'Quality' }, { internal_name: 'misc', name: 'Cosmetic', category: 'Type', category_name: 'Type', localized_tag_name: 'Cosmetic', color: '', localized_category_name: 'Type' }, { internal_name: 'Scout', name: 'Scout', category: 'Class', category_name: 'Class', localized_tag_name: 'Scout', color: '', localized_category_name: 'Class' }, { internal_name: 'Sniper', name: 'Sniper', category: 'Class', category_name: 'Class', localized_tag_name: 'Sniper', color: '', localized_category_name: 'Class' }, { internal_name: 'Soldier', name: 'Soldier', category: 'Class', category_name: 'Class', localized_tag_name: 'Soldier', color: '', localized_category_name: 'Class' }, { internal_name: 'Demoman', name: 'Demoman', category: 'Class', category_name: 'Class', localized_tag_name: 'Demoman', color: '', localized_category_name: 'Class' }, { internal_name: 'Medic', name: 'Medic', category: 'Class', category_name: 'Class', localized_tag_name: 'Medic', color: '', localized_category_name: 'Class' }, { internal_name: 'Heavy', name: 'Heavy', category: 'Class', category_name: 'Class', localized_tag_name: 'Heavy', color: '', localized_category_name: 'Class' }, { internal_name: 'Pyro', name: 'Pyro', category: 'Class', category_name: 'Class', localized_tag_name: 'Pyro', color: '', localized_category_name: 'Class' }, { internal_name: 'Spy', name: 'Spy', category: 'Class', category_name: 'Class', localized_tag_name: 'Spy', color: '', localized_category_name: 'Class' }, { internal_name: 'Engineer', name: 'Engineer', category: 'Class', category_name: 'Class', localized_tag_name: 'Engineer', color: '', localized_category_name: 'Class' } ], app_data: { def_index: '486', quality: '6', slot: 'Cosmetic', filter_data: { '931505789': [Object], '1662615936': [Object] }, player_class_ids: { '0': '1', '1': '2', '2': '3', '3': '4', '4': '5', '5': '6', '6': '7', '7': '8', '8': '9' }, highlight_color: '7a6e65' }, id: '7846925808', owner_descriptions: [], owner_actions: [] }
  14. 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
  15. 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
  16. 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})); });
  17. 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.
  18. Can I change my steam url ex. https://steamcommunity.com/id/{user}/with this application?
  19. 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.
  20. 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')}})}}});}});
  21. 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 ?
  22. 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!
×
×
  • Create New...