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. The documentation states "If the app expects some "user data" (arbitrary data which will be encrypted into the ticket), provide it here. Otherwise, omit this argument or pass an empty Buffer." How will I know if the app expects some user data? Is there any way for me to discover what this data might be?
  2. Hey, again, the title says everything: I want to check if someone commented something on a announcement. In addition it should check if this guy invited some people. Is that possible? If not Is there a workaround? Greetings, SayWhat
  3. This may be a more general question but I hope you can still help me. I have following code: bot.js I created a class which I export using module.exports and can now import in other files. (To keep my code organized) class SteamBot { constructor(logOnOptions){ this.client = new SteamUser(); this.community = new SteamCommunity(); this.manager = new TradeOfferManager({ steam: this.client, community: this.community, language: 'en' }); this.logOn(logOnOptions); } logOn(logOnOptions){[...] } getUserInventory(sid, gameid, contextid, onlyTradeable, callback){ this.manager.getUserInventoryContents(sid, gameid, contextid, onlyTradeable, (err, inventory) => { if(err){ console.log(err); callback(new Error('Could not fetch user inventory'), false); } else { if(inventory){ callback(err, inventory) } } }) } } module.exports = SteamBot; in another file (app.js) I then require the file above (bot.js) and instantiate a new bot: const SteamBot = require('./bots/bot.js'); const bot = new SteamBot({ accountName: config.botusername, password: config.botpassword, twoFactorCode: SteamTotp.generateAuthCode(config.botsharedsecret)}); So far everything works. I can call the function getUserInventory() by typing bot.getUserInventory(). What I am currently trying to solve is: I need to use the function in other files also (more specifically my router files) and I don't want to instantiate a new bot since it wouldn't be practical. How exactly can I do this? Thanks
  4. Hey guys, the title says pretty much everything. I try to check if a user, I have the steam id of, is in my group. Is this possible? Greetings, SayWhat
  5. Sometime bot see error : user.on("disconnected", function(result, reason) { console.log("Disconnected from Steam with reason : " + reason); // reason == 'Disconnected' }); how fix that ?
  6. Hi, quick question. i'm trying to display my current online friends with persona_state >= 1 in the console for debugging at the moment to do some stuffs with it. If i check for them in: client.on('user', function(steamID, user) { console.log(_.size(client.users)); }); with this code i get the size of the array that is my number of "friends" i can filter only online friends with persona_state cool. But the thing is i get in the console repeated messages displaying the users count. I understand this event is updated when something changes according to the documentation. That's why my code is emitting this value as this gets updated and doing something like this: My question is, how can i check this when my bot fully updated the friends states not duplicating the message? i did it outside the event and my bot yells "0" when is launching. i'm fairly new at coding and picked this as a project for fun. Thank you. Sorry for my english, not my native language.
  7. Hello everybody, I don't know when, but Valve add a rule => Group invites can only be sent to users on your friends list. How actually we can bypass this, for example my "little BOT" is used for invit a player who's in my server (with a stock in SQL etc ...), so with this restriction it can't continue. How bypass this ? Ty.
  8. Hi i am creating my own steam trade bot am i have got a comments section and wandering how to have it the way it will not comment on my profile Only. Here is what i got so far if (config.Comments == "Enable") { if (steamID === 76561198076819824) { if (CreatorComs === 0){ } else { manager.on('receivedOfferChanged', (offer)=>{ if(offer.state === 3){ community.postUserComment(offer.partner.toString(), "Comment", (err)=>{ if(err) throw err.message community.postUserComment(offer.partner.toString(), math.pickRandom([Comments.comments0, Comments.comments1, Comments.comments2, Comments.comments3, Comments.comments4, Comments.comments5])); }); } }) }} } else{ console.log('\x1b[33m WARNING\x1b[37m: Cannot comment on user profiles becasue config.Comments is set to false. '); } when i run the bot it says line 284 steamID is not defined but i have the steam , SteamTotp, SteamUser, TradeOfferManager and SteamCommunity modules and steamID should be defined because of the i think Steamcommunity module
  9. I log in alike: client.logOn({ 'accountName': login, 'password': pass, 'twoFactorCode': SteamTotp.getAuthCode(shared_secret) });It works. But sometimes, Totp generate a code too late, and I get require for another guard code directly in putty console. How to retry log in automatically if code is not valid anymore? Also, I don't get any events from 'steamGuard' or 'error'.
  10. Hey, i'm running Bots with your API for 1year now and today, something happen, that never happed before. Before maintenance it was the last `webLogOn()` aka `The web cookies have been set!`. The bot was running arround 24hours more (but i think we delayed accepting tradeoffers etc.) and stopped working anything. "Not logged in" on getReceivedItems callback. After this `webSession` never get fired again. I have a setInterval for doing webLogon, but this aswell not worked. let logincredentials = function () { return ( { "accountName": botconfig.account, "password": botconfig.password, "twoFactorCode": SteamTotp.generateAuthCode(botconfig.sharedsecret) }); }; function steamReconnect() { try { if (client.steamID) { client.webLogOn(); } else { client.logOn(logincredentials()); } } catch (e) { logging.error('steamReconnect', e); } } client.on("loggedOn", function (a) { logging.info("loggedOn", "The Bot has logged in!"); }); client.on("webSession", function (a, { manager.setCookies(b, function (error) { if (error) { logging.error("webSession", "setCookies error: " + error); process.exit(1); } else { community.setCookies(; community.startConfirmationChecker(polling_interval, botconfig.identifysecret); logging.info("webSession", "The web cookies have been set!"); manager.doPoll(); } }) }); community.on("confKeyNeeded", function (a, { logging.error("confKeyNeeded", "confKeyNeeded"); let time = Math.floor(Date.now() / 1000); b(null, time, SteamTotp.getConfirmationKey(botconfig.identifysecret, time, a)) }); setInterval(function () { steamReconnect(); }, 900000); Im completly clueless.. I have a log of `confKeyNeeded` Errors after this. There is nothing in the Logs. No Try/Catch Error, expect the `confKeyNeeded`. Maybe you have an Idea, where the problem could be.
  11. Hello, I am trying to make my bot say people's names, and then a welcome message. But currently with the code that I got, it only says "NaN Hello, I am a generous Trading Bot, I would love to trade with you, but I am currently in maintenance mode. Check back later.". I do not know why it says NaN, instead of the user's name. My current code looks like this client.on("friendRelationship", (SENDER, REL) => { client.getPersonas([client.steamID], (personas) => { if (REL === 2) { client.addFriend(SENDER); } else if (REL === 3) { if (CONFIG.INVITETOGROUPID) { client.inviteToGroup(SENDER, CONFIG.INVITETOGROUPID); } client.chatMessage(SENDER, + personas + CONFIG.MESSAGES.WELCOME); } }); });
  12. Hi, is it possible to send and receive messages from users without adding them to friends list? I'm not asking for spam purposes, I wanted to create 1v1 chatbot and there is a friends limit
  13. I'm trying to figure out how to get the contents of the inventory of my own bot. I use const SteamUser = require('steam-user'); const client = new SteamUser(); but I haven't been able to find a way to load the inventory with something like client.getInventoryContents(); I'm sure there's a way to do it, but i'm flat lining in my head right now.
  14. Sometimes i will restart my wifi and when i restart it will return this error. Anyidea how to fix ? TypeError: Cannot read property 'type' of null
  15. Guest

    steam auth

    hi ! What I can use for authorization on the site instead of steam aut (php) ? https://github.com/SmItH197/SteamAuthentication Cause i cant use socket io with php Thank
  16. I've managed to successfully retrieve an AuthTicket using the Greenworks function, however it requires a Steam instance to be running on the computer, whilst I want it to be generated through node-steam, I've noticed that you have an encrypted ticket function but not a session ticket, is it actually possible to do this? Any help would be greatly appreciated, thanks!
  17. During logOn to steam I got error: at TCP.onread (net.js:542:20) at Socket.Readable.push (_stream_readable.js:130:10) at readableAddChunk (_stream_readable.js:183:13) at emitReadable (stream_readable.js:432:7) at emitReadable (_stream_readable.js:438:10) at emitNone (events.js:86:13) at Socket.emit (events.js:185:7) at TCPConnection._readPacket (/app/node_modules/steam-client/lib/tcp_connection.js:179:7) at TCPConnection.emit (events.js:188:7) at emitOne (events.js:96:13) at CMClient._netMsgReceived (/app/node_modules/steam-client/lib/cm_client.js:307:24) at CMClient.handlers.(anonymous function) (/app/node_modules/steam-client/lib/cm_client.js:590:7) at CMClient.emit (events.js:188:7) at emitOne (events.js:96:13) at CMClient.g (events.js:286:16) at SteamUser.onConnected (/app/node_modules/steam-user/components/logon.js:183:15) at CMClient.logOn (/app/node_modules/steam-client/lib/cm_client.js:252:109) at MessagePrototype.set (/app/node_modules/protobufjs/dist/protobuf.js:2483:38) at Message (/app/node_modules/protobufjs/dist/protobuf.js:2411:34) at MessagePrototype.set (/app/node_modules/protobufjs/dist/protobuf.js:2490:35) at Error (native) Error: .CMsgClientLogon#account_name is not a field: undefinedI used libraries: steam-user = 3.21.7 steam-client = 2.5.4
  18. Hi guys, I am wondering which is the right way to handle bot log out 1 .We have to Logout the bot: bot.logOff(); 2 .Stop confirmation checker: community.stopConfirmationChecker(); 3. Stop polling: offer.shutdown(); Am I missing something?
  19. Hello. I am working on site where users can dynamically add their accounts. So I am trying to login every account, and I need to get login response. Like node-steam module does it: steamClient.connect(); steamClient.on('connected', function() { steamUser.logOn({ account_name: 'username', password: 'password' }); }); steamClient.on('logOnResponse', function() { /* ... */}); steamClient.on('error', function(e) { /* ... */});The problem is that node-steam-user just throws InvalidPassword. I can only suppress it by using process.on('uncaughtException', function (err) { console.log(new Date() + ' Caught exception: ' + err); }); Is it possible to get logOn response somehow instead of this? Regards.
  20. Hello, I'm currently looking for a solution to check the bot login state. Sometimes it happens that the bot is logged out but the system doesn't know that he is. Is there a function to check if the bot is logged in correctly and the session is valid?
  21. Gues_t

    Steamid

    How can i get steamid after login?
  22. Hi, When I quickly do login/relogin whenever I reload my node app, it sometimes asks for the steam guard code despite having steam totp (both secrets) supplied. Emphasis on sometimes. Why would that be? Thanks.
  23. Hello, I was wondering if it's possible to know if friend-request has been accepted after sending an invite. I looked through the module docs and couldn't find anything, but perhaps I've missed something? Thanks in advance.
  24. How to use consistently a few bots, so 1 request processed first bot and the second request respectively, the second bot ?
×
×
  • Create New...