Search the Community
Showing results for tags 'node-steam-user'.
-
Thank you, responding and help me
-
I got loginKey after first login with twofactorcode, and then i was loggining with this loginKey, but after time i got this error: InvalidPassword. Password was valid! I removed line with loginKey option, and typed my twofactorcode and everything is fine for the moment, why did it throw invalidPassword? Thanks!
-
Hey, I have a problem with changeEmail function. It worked for me untill 2 October 2018, but now when I am trying to use it, it says Access Denied. Can you check it and tell me what happened?
-
log('authCode'); let client = new Steam.CMClient(); let user = new SteamUser(client, {enablePicsCache: true, promptSteamGuardCode: false}); log("http://" + proxy); client.setHttpProxy("http://" + proxy); user.logOn({"accountName": username,"password": password, "authCode": code}); user.on('error', function(e) { console.log(e); closeConnection(user); }); user.on('steamGuard', function(domain, scallback) { console.log('authCode: badCode'); closeConnection(user); }); user.once('loggedOn', function(details) { log("authCode: loggedOn"); });log: UPD: proxy is't valid, please add error that proxy isn't valid
-
how can i get my bot steamid
-
how can i get friends/mine games using node-steam-user?
-
hello every one, i make promptSteamGuardCode is true so i can remove the SHAREDSECRET from my servers and i input the Guardcode every time now i want make the same thing to my accountName and password, so i can remove my USERNAME and PASSWORD from the servers, i thought it is safe. haker can't get my account after he get my servers. so , what should i do now , i search from the google and i get a way to use readline but it is so hard to me, may be i can get a easy way from here.
-
I saw a post 2ish months ago saying that basic 'new chat' support had been added to v4 of node-steam-user. How basic is that basic support? I ask because I've been trying to get chatMessage ID Event functionality working, but it doesnt appear to be triggering. This is not to say it is the module that is broken, because I am rewriting a bot I havent touched in 3 years to combine steamcommunity/player/client into 1 since it is basically an auto-reply bot. Can you confirm which features you were able to get 'fixed' for the new client, and which ones will have to wait until v4 is completed so you can hash them out? Thanks!
-
log: 0|start | TypeError: Cannot read property 'getSteamID64' of null 0|start | at /root/start.js:623:34 0|start | at /root/start.js:636:5 0|start | at /root/start.js:683:5 0|start | at Request._callback (/root/start.js:833:11) 0|start | at Request.self.callback (/root/node_modules/request/request.js:185:22) 0|start | at emitTwo (events.js:126:13) 0|start | at Request.emit (events.js:214:7) 0|start | at Request.<anonymous> (/root/node_modules/request/request.js:1161:10) 0|start | at emitOne (events.js:116:13) 0|start | at Request.emit (events.js:211:7)code: user.once('webSession', function(sessionID, cookies) { callback(apps, user.steamID.getSteamID64(), lockCode); });first time i got this error
-
Question Accepting friends request if member of group.
Seeringfate posted a topic in node-steam-user
Hi there, I'm trying to get my bot to accept friends request from members from my group. My code is not fully working, it keep getting errors at "community.groups(steamid). Here is my code: client.on("friendRelationship", (steamid, reletionship, name) => { if (reletionship === 2) { var userGroups = community.groups(steamid) if (userGroups.indexOf(wantedGroupID) != -1) { client.addFriend(steamid); client.chatMessage(steamid, `Thank you for adding me!`); console.log(`Friends request from ${name} accepted, IdleNet member. SteamID: ${steamid}`); } else { client.removeFriend(steamid); console.log(`Ignored friends request from ${name}, not in the IdleNet group. SteamID: ${steamid}`); } } });This is before my code: const SteamUser = require('steam-user'); const SteamTotp = require("steam-totp"); const SteamCommunity = require("steamcommunity"); const TradeOfferManager = require("steam-tradeoffer-manager"); var wantedGroupID = 'groupid'; const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeOfferManager({ steam: client, community: community, language: "en" }); const logOnOptions = { accountName: 'name', password: 'pass', twoFactorCode: SteamTotp.generateAuthCode("secret") }; client.logOn(logOnOptions); client.on('loggedOn', () => { console.log('Logged into Steam'); client.setPersona(SteamUser.Steam.EPersonaState.Online) client.gamesPlayed("Testing"); }); client.on("webSession", (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); community.startConfirmationChecker(10000, "secret"); }); Could someone help me ? Thanks ! -
Hey there, I'm not sure if this is the right section to post something like this, but I'm in need of a bot that basically purchases a game and send it as gift to users that bought that game (from me) in another website. Since Valve decided to erase the gift system, I'd need a bot that makes what I do manually (purchase, send as gift, etc.) There's a "platform" doing something similar (or identical): http://playxedeu.com/ Any ideas? Thanks!
-
I have variable that contains steamid64. There is a reason using variable, Because it changes. This id event is not working, However it does with const. Does it work only with const? If yes, How can i make it work? client.on('friendMessage#' + variable, function(steamID, message) { console.log("works"); client.chatMessage(steamID, "works " + message); });
-
Hello. Which device is logged in using the logOn method? Mobile or web browser ?
-
0|start | [22:13:15] "User has phone!" 0|start | [22:13:15] "thegamingemu69 has been removed from queue!" 0|start | [22:13:15] "close connection" 0|start | TypeError: Cannot read property 'setTimeout' of undefined 0|start | at CMClient.handlers.(anonymous function) (/root/bot/node_modules/steam-client/lib/cm_client.js:545:19) 0|start | at CMClient._netMsgReceived (/root/bot/node_modules/steam-client/lib/cm_client.js:305:24) 0|start | at TCPConnection.emit (events.js:182:13) 0|start | at TCPConnection.EventEmitter.emit (domain.js:442:20) 0|start | at TCPConnection._readPacket (/root/bot/node_modules/steam-client/lib/tcp_connection.js:183:7) 0|start | at Socket.emit (events.js:182:13) 0|start | at Socket.EventEmitter.emit (domain.js:442:20) 0|start | at emitReadable_ (_stream_readable.js:531:12) 0|start | at args.(anonymous function) (/usr/lib/node_modules/pm2/node_modules/event-loop-inspector/index.js:133:29) 0|start | at process._tickCallback (internal/process/next_tick.js:63:19)
-
Question Chat commands /wait until the user sends a message/
tvman99 posted a topic in node-steam-user
I've been trying to make async/await work. If someone sends specific message they get specific pre-written reply. I've done that using friendMessage ID event. Down the road, I need to catch the user's reply to include it in the reply. Well i assume if i give you an example of it. Ofc the user should start it as long as bot does something depends on the chat message/ i call it chat command/. User: !addadmin Bot: Who's it? Send the steamid64 to me. User: xxxxxxxxxxxxxxxxx /*sends steamid64*/ Bot: xxxxxxxxxxxxxxxxx is not in my friends list. Tell him to add me. OR Bot: xxxxxxxxxxxxxxxxx is in my friends list. Made him/her the master of me. It was an example. If you are able to, code the catching of user reply and using it in some checks then replies. -
var _ = require('lodash'); var carrier = require('carrier'); var crypto = require('crypto'); var fs = require('fs'); var net = require('net'); var path = require('path'); var prompt = require('prompt'); var steamid = require('steamidconvert')() var Steam = require('steam'); var steamClient = new Steam.SteamClient(); var steamFriends = new Steam.SteamFriends(steamClient); var steamUser = new Steam.SteamUser(steamClient); var config = require(path.join(__dirname,'config.json')); config.sentryPath = path.join(__dirname, config.login+'-sentry.bin'); var q = {}; var usersLastLogoff = []; var schema = { properties: { steamauth: { description: 'Enter your steam auth code: ', message: 'This should be emailed to you.', type: 'string', required: true, pattern: /[0-9a-zA-Z\s]*/ } } }; steamClient.connect(); steamClient.on('connected', function() { var sha = undefined; if(fs.existsSync(config.sentryPath)) { console.log('Sentry file found. Sending to server.') var file = fs.readFileSync(config.sentryPath); sha = crypto.createHash('sha1').update(file).digest(); } steamUser.logOn({ account_name: config.login, password: config.pass, auth_code: config.auth, sha_sentryfile: sha }); }); steamClient.on('logOnResponse', function(logonResp) { if (logonResp.eresult === Steam.EResult.AccountLogonDenied) { steamClient.disconnect(); prompt.get(schema, function (err, result) { if (result.steamauth){ config.auth = result.steamauth; steamClient.connect(); } }); prompt.start(); }else if (logonResp.eresult === Steam.EResult.OK) { console.log('Logged in!'); steamFriends.setPersonaState(Steam.EPersonaState.Online); steamFriends.setPersonaName(config.displayName); }else{ console.log('Login failed.'); } }); steamUser.on('updateMachineAuth', function(sentry, cb) { console.log('Obtained sentry. Writing to '+config.sentryPath); fs.writeFileSync(config.sentryPath, sentry.bytes); cb({ sha_file: crypto.createHash('sha1').update(sentry.bytes).digest() }); }); steamFriends.on('relationships', function(){ checkFriendsLimit(); var friends = steamFriends.friends; for(var friend in friends){ if (friends[friend] === 2){ steamFriends.addFriend(friend); } } }); steamFriends.on('friend', function(friend, type){ checkFriendsLimit(); if(type === 2){ steamFriends.addFriend(friend); } }); steamFriends.on('personaState', function(state){ if ((_.has(state, 'last_logoff')) && !(_.has(state, 'persona_state'))){ usersLastLogoff.push(state); cleanUsers(); }else{ var id = state.friendid; if (_.has(q, id)){ _.each(q[id], function(message){ steamFriends.sendMessage(id, message); }); delete q[id]; } } }); var checkFriendsLimit = _.debounce(function (){ var friends = steamFriends.friends; var friendsArray = Object.keys(friends); if (friendsArray.length > config.maxFriends){ steamFriends.requestFriendData(friendsArray, Steam.EClientPersonaStateFlag.LastSeen); } } , 5000); var cleanUsers = _.debounce(function (){ if (steamClient.connected){ var sorted = _.sortBy(usersLastLogoff, 'last_logoff'); var purgeAmount = sorted.length - config.maxFriends; console.log('Purging old friends.') _.times(purgeAmount, function(i){ var id = sorted[i].friendid; console.log('Removing: ', id); steamFriends.removeFriend(id); }); usersLastLogoff = []; } } , 5000); var connect = _.debounce(function (){ steamClient.connect(); } , 5000); steamClient.on('error', function (e){ console.log(e); connect(); }); net.createServer(function (socket) { socket.on('error', function(err){ console.log('Socket Error: \n', err); }); carrier.carry(socket, function(line) { if (steamClient.connected){ if ((_.startsWith(line, 'BCMD')) && (line.length > 12)) { var cmd = line.substring(4, 8); var packet = line.substring(8).split('|'); var id = steamid.convertTo64(packet[0]); var msg = packet[1]; if (_.has(steamFriends, ['friends', id])){ if (steamFriends.friends[id] === 3){ steamFriends.sendMessage(id, msg); } if (steamFriends.friends[id] === 4){ q[id].push(msg); } }else{ checkFriendsLimit(); steamFriends.addFriend(id); if (!(_.has(q, id))){ q[id] = []; } q[id].push(msg); } } } }); }).listen(config.port); console.log('Server running on port '+config.port+'\n'); it was working very well script but When I change my vds suddenly its not working, its not login to steam account.. someone can help me ?
-
ClientGamesPlayed does not seem to work, I made sure the bot's privacy settings allowed for it client.gamesPlayed(440);
-
Hi, someone have idea on antyspam? I just won't get spam like 20 messages from the same user in 3 sec ( or more). Have a nice day
-
So, I've tried the use of proxies quite a few time, but I found out none or very little of the free proxies that I can gather, actually works. On the contrary, any arbitrary free VPN works great with node-steam (and steam client). I'm not well educated on the topic of proxies and VPN's, but what is so different, that free proxies not work, while free VPN's do? Is there such a thing as a virtual/local VPN, which we can use instead of a proxy (thus not affecting all network traffic, as a normal VPN would)?
-
client.on('appOwnershipCached', function() { const appIDs = client.getOwnedApps(); const appDetails = client.getProductInfo(appIDs, () => { fs.writeFileSync('./logs/info.json', JSON.stringify(appDetails, null, 4)); }); }); This is my code I was trying to get the product info of all the app I have but I got this error Logged into Steam! /mnt/e/Projects/web/steam-bot/node_modules/steam-user/components/apps.js:134 packages = packages.map(function(pkg) { ^ TypeError: packages.map is not a function at SteamUser.getProductInfo (/mnt/e/Projects/web/steam-bot/node_modules/steam-user/components/apps.js:134:22) at SteamUser.<anonymous> (/mnt/e/Projects/web/steam-bot/bot.js:51:29) at emitNone (events.js:106:13) at SteamUser.emit (events.js:208:7) at /mnt/e/Projects/web/steam-bot/node_modules/steam-user/components/apps.js:481:9 at /mnt/e/Projects/web/steam-bot/node_modules/steam-user/components/apps.js:295:5 at Object.cb (/mnt/e/Projects/web/steam-bot/node_modules/steam-user/components/messages.js:174:4) at CMClient._netMsgReceived (/mnt/e/Projects/web/steam-bot/node_modules/steam-client/lib/cm_client.js:321:26) at CMClient.handlers.(anonymous function) (/mnt/e/Projects/web/steam-bot/node_modules/steam-client/lib/cm_client.js:603:8) at CMClient._netMsgReceived (/mnt/e/Projects/web/steam-bot/node_modules/steam-client/lib/cm_client.js:305:24) Can anyone Plese help?
-
When I call this API in the browser http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=steam_key&steamid=my_steam_id_64&format=json I get { "response": { "game_count": 2, "games": [ { "appid": 304390, "playtime_2weeks": 20, "playtime_forever": 20 }, { "appid": 654310, "playtime_2weeks": 20, "playtime_forever": 20 } ] } } Which is correct You can confirm by seeing my profile https://steamcommunity.com/id/auto-bot TF2 doesn't show up as it is free I guess. but when I call client.getOwnedApps(); I get an array of 207 appIDs out of which 204 are the ones that steam adds by default. So what I wanted to ask was that Is there any way I can only get the appIDs of games that are present in my account. Your help will be greatly appreciated.
-
What is needed and how can a "auth secret" be used that is returned by the "getAuthSecret" method. And what does "pre-shared key" mean?
-
Can you give an example , how to use proxy. And what type need to use socks5 or http/https?
- 12 replies
-
- node.js
- node-steam-user
-
(and 1 more)
Tagged with: