Jump to content
McKay Development

Search the Community

Showing results for tags 'node-steam-user'.

  • 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.getTradeURL(function(err, details) { if(err) return console.log("error: " + err); console.log(badvar); });log: error: ReferenceError: badvar is not defined
  2. 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
  3. 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
  4. user.on('error', function(e) { log(username, "error: " + JSON.stringify(e)); log(username, e);}); Sometimes returns "{}" log:[y6p123] error: {}[y6p123] } Why?
  5. Is it possible to send image to friend with sendChatMessage? If yes which format it should be? Can i send a buffer?
  6. 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.)
  7. 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.
  8. Where can I read the documentation about client.changeEmail
  9. 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!
  10. 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
  11. 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
  12. 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)
  13. 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
  14. 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
  15. 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
  16. Hello, I was messing around with the UIMode status and saw that VR was missing, This file hasn't been touched since 1 Jun 2016 so I also assume you haven't revised it or looked into it at a later given time? I was wondering if you could revisit it and perhaps add it if possible? Thank you regardless, https://github.com/DoctorMcKay/node-steam-user#setuimodemode
  17. Hi, how do I set that I'm playing a custom game in my profile. I tried placing the string first but still goes online and shows as playing a game with the first integer in my array client.gamesPlayed(["some string here", 730, 440, ..., ....]); edit: I made it work by via this: let x = "some string here"; let y = x.toString(); client.gamesPlayed([y, 730, 440, ..., ....]);
  18. I am writing the previous username used with the loginKey to a json file. steamUser.on("loginKey", key => { var loginInfo = { accountName: userInfo.accountName, loginKey: key }; var json = JSON.stringify(loginInfo); fs.writeFile("./login.json", json, "utf8", err => { if (err) { console.error(err); } }); }); userInfo is an object containing accountName and rememberPassword which the user enters on startup. This is the contents of the file "login.json" (Obviously I haven't included the username and loginKey in this post but they are there in the real thing) {"accountName":"","loginKey":""} I then load this file and use it with the logOn function: var SteamUser = require("steam-user"); var steamUser = new SteamUser(); ... var prevLogin = require("login.json"); prevLogin["rememberPassword"] = true; steamUser.logOn(prevLogin); Then I get this error: { Error: InvalidPassword at SteamUser.<anonymous> (/home/lenny/expanddong/steam-user-testing/node_modules/steam-user/components/logon.js:458:16) at handlers.forEach (/home/lenny/expanddong/steam-user-testing/node_modules/steam-user/components/classes/HandlerManager.js:37:12) at Array.forEach (<anonymous>) at HandlerManager.emit (/home/lenny/expanddong/steam-user-testing/node_modules/steam-user/components/classes/HandlerManager.js:36:12) at SteamUser._handleMessage (/home/lenny/expanddong/steam-user-testing/node_modules/steam-user/components/messages.js:532:24) at SteamUser._handleNetMessage (/home/lenny/expanddong/steam-user-testing/node_modules/steam-user/components/messages.js:467:7) at SteamUser.processMulti (/home/lenny/expanddong/steam-user-testing/node_modules/steam-user/components/messages.js:559:9) at SteamUser.<anonymous> (/home/lenny/expanddong/steam-user-testing/node_modules/steam-user/components/messages.js:553:16) at handlers.forEach (/home/lenny/expanddong/steam-user-testing/node_modules/steam-user/components/classes/HandlerManager.js:37:12) at Array.forEach (<anonymous>) eresult: 5 } So clearly I am doing something wrong. Is there some sort of tutorial on the correct way to do it? Or can someone tell me if they spot a mistake?
  19. Hello, I'm trying to set a config on a bot I found on the internet. I'm trying to set the name of the current game that I'm playing to something like "Boosting Hours" or any string. Also tried to set to Snooze like this: bot.setPersona(SteamUser.EPersonaState.Snooze); and didn't work... This is the bot: IdlerConfig.js var steamClientFactory = require('./steamClient.js'); var configsArray = []; var config; var botArray = []; config = {}; config.username = 'nick1'; config.password = 'pass1'; config.sharedSecret = ''; //Shared Secret(for 2FA only) https://github.com/Jessecar96/SteamDesktopAuthenticator/releases config.games = [730,440,570] configsArray.push(config); config = {}; config.username = 'nick2'; config.password = 'pass2'; config.sharedSecret = ''; //Shared Secret(for 2FA only) https://github.com/Jessecar96/SteamDesktopAuthenticator/releases config.games = [730,440,570] configsArray.push(config); console.log('Number of configurations set up: ' + configsArray.length); for (index = 0; index < configsArray.length; index++) { var config = configsArray[index]; var bot = steamClientFactory.buildBot(config); bot.doLogin(); botArray.push(bot); } console.log('Running ' + botArray.length + ' bots.'); steamClient.js var SteamUser = require('steam-user'); var SteamTotp = require('steam-totp'); var botFactory = {}; botFactory.buildBot = function (config) { var bot = new SteamUser({ promptSteamGuardCode: false, dataDirectory: "./sentry", singleSentryfile: false }); bot.username = config.username; bot.password = config.password; bot.sharedSecret = config.sharedSecret; bot.games = config.games; bot.messageReceived = {}; bot.on('loggedOn', function(details) { console.log("[" + this.username + "] Logged into Steam as " + bot.steamID.getSteam3RenderedID()); bot.setPersona(SteamUser.EPersonaState.Online); bot.gamesPlayed(this.games); }); bot.on('error', function(e) { console.log("[" + this.username + "] " + e); setTimeout(function() {bot.doLogin();}, 30*60*1000); }); bot.doLogin = function () { this.logOn({ "accountName": this.username, "password": this.password }); } bot.on('steamGuard', function(domain, callback) { if ( !this.sharedSecret ) { var readlineSync = require('readline-sync'); var authCode = readlineSync.question("[" + this.username + "] " + 'Steam Guard' + (!domain ? ' App' : '') + ' Code: '); callback(authCode); } else { var authCode = SteamTotp.generateAuthCode( this.sharedSecret ); console.log("[" + this.username + "] Generated Auth Code: " + authCode); callback(authCode); } }); bot.on("friendMessage", function(steamID, message) { console.log("[" + this.username + "] Message from " + steamID+ ": " + message); if ( !this.messageReceived[steamID] ) { bot.chatMessage(steamID, "[Automated Message] I am currently idle. I will respond when I am next available."); this.messageReceived[steamID] = true; } }); bot.on('vacBans', function(numBans, appids) { if(numBans > 0) { console.log( "[" + this.username + "] " + numBans + " VAC ban" + (numBans == 1 ? '' : 's') + "." + (appids.length == 0 ? '' : " In apps: " + appids.join(', ')) ); } }); bot.on('accountLimitations', function(limited, communityBanned, locked, canInviteFriends) { var limitations = []; if(limited) { limitations.push('LIMITED'); } if(communityBanned) { limitations.push('COMMUNITY BANNED'); } if(locked) { limitations.push('LOCKED'); } if(limitations.length !== 0) { console.log("[" + this.username + "] Limitations: " + limitations.join(', ') + "."); } }); return bot; } module.exports = botFactory; Can anyone help me? Thank you all
  20. I have code SteamCommunity.prototype.uploadAvatar = function(image, format, callback) { if(typeof format === 'function') { callback = format; format = null; } // are we logged in? if (!this.steamID) { callback(new Error("Not Logged In")); return; } var self = this; if(image instanceof Buffer) { doUpload(image); } else if(image.match(/^https?:\/\//)) { this.httpRequestGet({ "uri": image, "encoding": null }, function(err, response, body) { if(err || response.statusCode != 200) { if(callback) { callback(err ? new Error(err.message + " downloading image") : new Error("HTTP error " + response.statusCode + " downloading image")); } return; } if(!format) { format = response.headers['content-type']; } doUpload(body); }, "steamcommunity"); } else { if(!format) { format = image.match(/\.([^\.]+)$/); if(format) { format = format[1]; } } FS.readFile(image, function(err, file) { if(err) { if(callback) { callback(err); } return; } doUpload(file); }) } function doUpload(buffer) { if(!format) { if(callback) { callback(new Error("Unknown image format")); } return; } if(format.match(/^image\//)) { format = format.substring(6); } var filename = ''; var contentType = ''; switch(format.toLowerCase()) { case 'jpg': case 'jpeg': filename = 'avatar.jpg'; contentType = 'image/jpeg'; break; case 'png': filename = 'avatar.png'; contentType = 'image/png'; break; case 'gif': filename = 'avatar.gif'; contentType = 'image/gif'; break; default: if(callback) { callback(new Error("Unknown or invalid image format")); } return; } self.httpRequestPost({ "uri": "https://steamcommunity.com/actions/FileUploader", "formData": { "MAX_FILE_SIZE": buffer.length, "type": "player_avatar_image", "sId": self.steamID.getSteamID64(), "sessionid": self.getSessionID(), "doSub": 1, "json": 1, "avatar": { "value": buffer, "options": { "filename": filename, "contentType": contentType } } }, "json": true }, function(err, response, body) { if(err) { if(callback) { callback(err); } return; } if(body && !body.success && body.message) { if(callback) { callback(new Error(body.message)); } return; } if(response.statusCode != 200) { if(callback) { callback(new Error("HTTP error " + response.statusCode)); } return; } if(!body || !body.success) { if(callback) { callback(new Error("Malformed response")); } return; } if(callback) { callback(null, body.images.full); } }, "steamcommunity"); } }; How to choose a photo and upload it?
  21. Hello. Can anyone make a code example on how to join a group chat, default "Home" channel?
  22. I noticed after searching around that steam-user doesn't have a Typescript definition for Visual Studio Code, will it stay like that or will we have one in the future ?
  23. Hello, i bought proxies on luminati.io. But always getting 'HTTP CONNECT 403 Bad Port' error on logOn. My Code: let user = new SteamUser({ singleSentryfile: false, promptSteamGuardCode: false, dateDirectory: null, httpProxy: 'http://lum-customer-mycustomerid-zone-myzonename:mypassword@host:22225' }); user.logOn({ accountName: 'test', password: 'test', rememberPassword: true });Debug:
  24. So I am using steam-user to get a list of gameservers. My code worked for a while but when I tried to do it again on another script it just returns "null". I have tried everything I can think of and I am out of ideas. Anything to point me in the right direction would be greatly appreciated. const SteamUser = require('steam-user'); const client = new SteamUser(); client.logOn(); client.on('loggedOn', () => { console.log('Logged into Steam'); client.getServerList(null, 100, (servers) => { console.log(servers); }) });
×
×
  • Create New...