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. So, I am trying to download all .manifest files of all my owned games. Here is the snippet that should do this: client.once("appOwnershipCached", function() { console.log("appOwnershipCached"); client.getProductInfo(client.getOwnedApps(), [], function(apps) { console.log("gotProductInfo"); apploop: for (appid in apps) { depotloop: for (depotid in apps[appid].appinfo.depots) { if (!isNaN(parseInt(depotid))) { //is key the depot id? manifestloop: for (type in apps[appid].appinfo.depots[depotid].manifests) { var manifestid = apps[appid].appinfo.depots[depotid].manifests[type]; client.getRawManifest(parseInt(appid), parseInt(depotid), manifestid, function(error, manifest) { if (!error) { //console.log(manifest); fs.writeFile(path.join(__dirname + "/" + depotid + "_" + manifestid + ".manifest"), manifest, "utf8", function(error) { console.log(error); }); } }); break apploop; //limit to 1 manifest for now } } } } }); }); But the .manifest file I get isn't quite the same as the original downloaded directly from Steam. I suspect because the filenames are encrypted with my .manifest file. The problem is though, there is no feature that decrypts the filenames without parsing the raw manifest into an JSON object. Is this the problem? Or is it something else? Should I do something differently? Thanks 11_3149618157612033597.manifest.zip
  2. Hi. I'm tryng to use changeEmail function, but nothing happens I think i use it wrong. Thanks. Sample code which I use: var login = "exampleLogin"; var pass = "examplePass"; var newEmail = "[email protected]"; client.logOn({ "accountName": login, "password": pass }); client.on('loggedOn', function(details) { console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID()); }); client.on('changeEmail', function(password, newEmail, err){ console.log(err); });
  3. So this is the error from console. When my session expires, I use this code to come back on track: community.on('sessionExpired', (ERR) => {console.log("## Session Expired. Relogging.");client.webLogOn();}); Not sure if it synced with this code, but I will write it too client.on('webSession', function (sessionID, cookies) {manager.setCookies(cookies, function (err) {if (err) {console.log(dateFormat(Date(), "dd.mm.yyyy HH:MM:ss ") + " - " + err);//process.exit(1); I commented this cause I don't want to stop the node immediatelyclient.webLogOn(); // I put this in order to do webLogon again, not sure if necessaryreturn;}}); community.setCookies(cookies);community.chatLogon();community.startConfirmationChecker(config.steam.refreshInterval, config.steam.secret);if (config.social.hasToUpdateProfile) {updateProfile();}}); So yeah, any ideas how to solve this problem, and not get my node getting down after this Error("Cannot log onto steamcommunity.com without firs t being connected to Steam network"); ? Thank you in advance! One solution would be to use forever npm, but I would like to hear other opinions how I could rework the code, to not make the node go off, because I'm not up to use that npm due to some variables being saved while bot is being up.
  4. Hello everyone, previously i made few steam bots without having any issue but this time whenever i try to run the bot with node then i get this error : /home/bot/node_modules/steamcommunity/node_modules/steam-totp/nod[email protected]<script data-cfhash='f9e31' type="text/javascript">/* */</script>/stats-reporter/index.js:9 let g_StartupTimestamp = Math.floor(Date.now() / 1000); ^^^^^^^^^^^^^^^^^^ SyntaxError: Unexpected identifier at exports.runInThisContext (vm.js:73:16) at Module._compile (module.js:443:25) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Object.<anonymous> (/home/bot/node_modules/steamcommunity/node_modules/steam-totp/index.js:1:63) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) can anyone please help me ? thank you
  5. Hello. Is it possible to get someone's friendlist (SteamIDs)? Regards.
  6. This is my code: manager.on('pollSuccess', () => { if (!client.steamID) { client.logOn(getLogOnOptions()); } });But today some bots did not restart. In the logs I found the following: Steam Guard App CodeIs it possible to catch this event? Or how to avoid errors when restart?
  7. Hello all, I just finished working on a bot using this tutorial. After trying to use it I noticed from debugging this: Exception has occurred: Error TypeError: Cannot read property 'on' of undefined at Object.<anonymous> (c:\node\tradebot.js:127:15) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Timeout.Module.runMain [as _onTimeout] (module.js:604:10) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Here is the code causing the error. client.friends.on('relationships', function(){ After closely looking at the comments in the guide I saw McKay said this: So to fix the issue do I download the github repo for steam-user and override mine with the 1.13.0 version? Otherwise how would you go about doing things involving friends without using client.friends.on() ? Thanks for your time and help
  8. HI, I'm having trouble employing the group invite function of the steam-user module. My script is very simple, and meant to just invite the user to a designated group upon login: const SteamUser = require('steam-user'); const net = require('net'); const client = new SteamUser(); const SteamID = require('steamid'); ///First, log into Steam const logOnOptions = { accountName: 'xxx', password: 'xxx' //Disable your steam guard }; client.logOn(logOnOptions); client.on('loggedOn', () => { console.log("Logged into Steam as " + client.steamID.getSteam3RenderedID()); client.setPersona(SteamUser.EPersonaState.Online); client.gamesPlayed(440); var sid = new SteamID("103582791434188513"); client.inviteToGroup( "76561198161775645", sid ); }); client.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("Our account has no limitations."); } else { console.log("Our account is " + limitations.join(', ') + "."); } if (canInviteFriends) { console.log("Our account can invite friends."); } }); The output is as follows: And yet, I don't receive any invitation. The SteamID64 and GroupID64 are both valid, so why might I have this issue?
  9. After today's maintenance, my bot stopped to be online. I can't restore my bot. I tried to reproduce the disconnection with Steam. I determine that my bot is offline manager.on('pollSuccess', () => { if (!client.steamID || !csgo.haveGCSession) { // My bot is offline. Maybe there's another way? } });If I do client.logOff() then I try to relog client.relog()I'am getting nothing. Ok. I changed my code to: if (client.steamID) { client.relog(); } else { client.logOn(getLogOnOptions()); }But after client.logOff(), client.steamID - is set and relog is not working. Why after client.logOff() my condition is not working? Maybe I need something to add to the condition? Update And after client.logOff() invoked event disconnected but autoRelogin not invoked.
  10. Hello! I'm getting the Sentry file from the 'steam' module. When I try to logon using this module, I set the sentry file and it still requests me to input the Steam Guard code. Here's how I'm getting the sentry from Steam.SteamUser: function MakeSha(bytes) { var hash = crypto.createHash('sha1'); hash.update(bytes); return hash.digest(); } this.steamClientUser.on('updateMachineAuth', (sentry, cb) => { fs.writeFileSync(/* path */, sentry.bytes); // Method which uses steam-user module this.loginWithSentry(); cb({ sha_file: MakeSha(sentry.bytes) }); this.steamClient.disconnect(); });And here, how I set the sentry, reading from the file that was written in the above code. let sentryFile = fs.readFileSync((/* path */)); this.steamUser.setSentry(sentryFile); this.steamUser.logOn({ accountName: this.username, password: this.password });After this, the console asks for the steam guard code, apparently ignoring the sentry.PS: The sentry file is actually 2KB.
  11. Hi, when Steam prompts me for a SteamGuard code and the steamGuard event is fired, It keeps on saying that the last provided code is wrong and the event is fired again and again. I set the 'promptSteamGuardCode' to false. Any idea why might this be? Your help is much appreciated. client.on('steamGuard', function(domain, callback, lastCodeWrong) { console.log("SteamGuardCode will be provided in 5 seconds!"); setTimeout(function() { var twoFactorCode = SteamTotp.getAuthCode(logonOptions.twoFactorCode); console.log(lastCodeWrong); // true return callback(twoFactorCode); }, 5000); }); Regards, tbo
  12. Hey, I want to display a message as a non-Steam game and I also want to idle a game on the background. What I have now: console.log("Logging in to Steam..."); client.logOn(logOnOptions); client.on('loggedOn', () => { console.log('Logged into Steam'); client.setPersona(1); client.gamesPlayed("Custom message", 440); }); But tf2 doesnt idle
  13. Hello How to get badge level another person, friend?
  14. Hello, var aaaaaaaaaa= "76561198041931474";client.on('getchatHistory', function(aaaaaaaaaa, callback) {console.log(callback);}); It doesn't return anything.
  15. Hey guys! I would like to ask for help. Someone can tell me where to find it my shared_secret and identity_secret? I use Steam Desktop Authenticator (jessecar96). Thanks for the help!
  16. Hi! When I try to list all users in current group chat it only returns a single user, when i print object of the group chat i get: { name: '...', members: { '76561198067864125': { rank: 1, permissions: 891} }, <-- it says there is only one member private: false, invisibleToFriends: false, officersOnlyChat: false, unjoinable: false } },other members appear when they join/rejoin chat.
  17. Hi guys! At the moment I'm working on a chat-bot Steam, the essence of which will be giving out things for winning in the game, and all this will happen right in the bot, but I ran into the problem that I can not get data from the user: client.on('friendOrChatMessage', (senderID, message) => { if (message.indexOf("/bet %user number%") == 0){ client.chatMessage(senderID, 'Your bet is: ' + %user number%); } }); where %user number% is the number that the user enters, but I do not know how it can be implemented :C Is it even possible to do this and how? Please help me!
  18. Hello, I'm trying to send this packet: https://github.com/DoctorMcKay/node-steam-user/blob/master/protobufs/steammessages_clientserver.proto#L832 I don't get an error but it doesn't update the statistic.
  19. sclient.on('groupRelationship', (steamid, relationship) => { groupSteamID = steamid; if(relationship === 2) { dbot.channels.get('302817074269519873').sendMessage('You have been invited to this group: "' + groupSteamID + '" \n If you want to accept the group request, reply with ``!accept group``. \n And if you want to decline it, reply with ``!decline group``.'); console.log('New group invite to this group: "' + groupSteamID + '"'); } }); if (command === "accept-group") { sclient.accept(groupSteamID) = true; dbot.channels.get('302817074269519873').sendMessage("Accepted group invite: " + friendrqst); console.log("Accepted group invite: " + friendrqst); } if (command === "decline-group") { sclient.accept(groupSteamID) = false; dbot.channels.get('302817074269519873').sendMessage("Declined group invite: " + groupSteamID); console.log("Declined group invite: " + groupSteamID); } I am using the node-steam module and the discord.js module just for you information. sclient.accept(groupSteamID) is not a function is my error when I try to accept/decline the invite
  20. How can I get a groups/users name except the steam64id/groupid? Currently I just get something like this for a group: 103582791456793547 Or for a user his Steam64ID
  21. Some time bot login again . I want to know how long session expired . And how increase time session live . Thank !
  22. Hi, I'm trying to make a bot with this package. After I call the client.logOn method with my account name, password and twoFactorCode, I handle the loggedOn event. But even if details.eresult is set to OK, I can't put my bot into Online state, and the event who should be fired after the login isn't emitted (like accountInfo, wallet, accountLimitations, ...). There is my little code : // Require const config = require('config'); const SteamTOTP = require('steam-totp'); const SteamUser = require('steam-user'); console.log("> Welcome."); let steamCredentials = config.get('steam'); // Init SteamUser let client = new SteamUser(); client.on('loggedOn', function(details) { if(details.eresult !== SteamUser.EResult.OK) { console.log("> An error occurred when login."); return; } console.log("> Login successful."); client.setPersona(SteamUser.EPersonaState.Online); }); // This event is emit when the connection is lost with Steam. client.on('error', function(e) { console.log("> An error occurred :"); console.log(e); }); client.on('steamguard', function(domain, callback) { console.log("> Steam Guard code needed."); let code = SteamTOTP.generateAuthCode(steamCredentials.totp_shared_secret); callback(code); }); client.on('accountInfo', function(name, country, authedMachine, flags, facebookID, facebookName) { console.log("> Your name is " + name); console.log("> Your country is " + country); }); // Now, we log on. console.log("> Initiate Login."); client.logOn({ "account_name": steamCredentials.account_name, "password": steamCredentials.password, "twoFactorCode": SteamTOTP.generateAuthCode(steamCredentials.totp_shared_secret) }); I can't see why i don't have any event after the login...
  23. Hello, is there any possible way to like fetch/get comments from a profile?
  24. Hi, I'm using SteamUser.gamesPlayed({"game_id": 440}); but when I try start game on steam client, bot get this error: "Error: LoggedInElsewhere" and crashes. How to make bot doesn't crash, And waited until the account is freed and reconnect after that?
  25. Hi folks, I'm trying to work with the Global Offensive API for node.js, and am rather lost. Here's what I'm trying to do: I want to log into a bot Steam account that is online when the node is running, and then monitor the match status of the account's friends. I'm doing this so I could have the bot friend my account and the accounts of all my friends, and then when I call function: matchStatus('friend's steam username'); it returns what match mode they are playing in, and if they're playing a comp match, what the score is and what team they're on. I'm going to call the method through a different node, the discord.js node. Using that api, I've set up a bot that will detect when someone types in the group chat: " matchStatus 'steam username' " and execute a function as a result. Using this, I should be able to interact with the global offensive node as long as I initiate them both in the same .js file? I should be able to work out most of the code on my own, I'm just having trouble getting the global offensive node running in the first place with a bot account. If someone had some example code of this, it would go a long way. I really appreciate any advice and help anyone on here can offer, and for taking the time to respond to this, -L
×
×
  • Create New...