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. Hi how is made a mobile app i mean when i try to log in and i need a code the phone is showing actual code in push notification. How to get this "steamguardcodeneeded" event in my node.js app?
  2. Hi, I'm waiting for accountInfo to be emitted then var accInfo = client.accountInfo; it's undefined. What am I doing wrong?
  3. This issue arose only after updating steam-user with NPM; and i suspect it updated binarykvparser as a dependency. Key is successfully redeemed however throws this error BEFORE successful confirmation. /home//accounts/accounts/node_modules/binarykvparser/index.js:74 throw new Error("Unknown KV type " + type + " encountered at offset " + offset[0]); ^ Error: Unknown KV type 10 encountered at offset 106 at Object.exports.parse (/home//accounts/accounts/node_modules/binarykvparser/index.js:74:11) at Object.exports.parse (/home//accounts/accounts/node_modules/binarykvparser/index.js:49:21) at /home//accounts/accounts/node_modules/steam-user/components/apps.js:463:38 at Object.cb (/home//accounts/accounts/node_modules/steam-user/components/messages.js:152:4) at CMClient._netMsgReceived (/home//accounts/accounts/node_modules/steam-client/lib/cm_client.js:276:26) at CMClient.handlers.(anonymous function) (/home//accounts/accounts/node_modules/steam-client/lib/cm_client.js:386:8) at CMClient._netMsgReceived (/home//accounts/accounts/node_modules/steam-client/lib/cm_client.js:260:24) at emitOne (events.js:96:13) at TCPConnection.emit (events.js:188:7) at TCPConnection._readPacket (/home//accounts/accounts/node_modules/steam-client/lib/tcp_connection.js:73:7)
  4. So I'm working on a BOT I don't know what I'm going to do with it currently in this stage I have it as an idle bot with a configuration file and I've been working on trying to get it to respond whenever Solomon messages it with the response message and for some reason the bot doesn't even acknowledge the event. I tried using this from another post: client.on("friendMessage", function(steamID, message) { console.log("Friend message from " + steamID+ ": " + message); client.chatMessage(steamID, config.response); }); } and the bot doesn't reply at all or even log that it got sent a message
  5. Hello I am having an issue when using steam-user. I am getting stuck in a loop with steamguard. It seems to work fine for non-steamguard accounts but after entering the steamguard code it will simply send me another email and prompt me for another steamguard code. I have an example script that I created and tried to upload however I just get an error message "You aren't permitted to upload this kind of file" Hopefully someone has an idea what I'm doing wrong and/or can post an example code.
  6. Hello! I was just wondering about the cookies that node-steam-user uses... it is possible to use this cookies (like copy/paste them) in firefox/chrome? Or are just for your App? Becasuse I would like to login on other browsers, but I don't know if I would get trade-banned for 7 days if I log on other different broswer. Thanks for reading me and have a happy gaming!
  7. Good evening. I have a few bots running through one script. I would like to know what data needs for gamesPlayed to specify which bot you need to log into the game.
  8. I have a random one - Is it possible to retrieve the logonID from the client once logged in? Or is there another way to pass some kind of token or variable upon logOn (Eg. MachineName) and retrieve it after loggedOn?
  9. manager.on('newOffer', function (offer) { var onlyCards = (offer.itemsToReceive.every(function(item) { return item.tag == "Trading card" && item.tag == "Not Marketable"; })); console.log('[OFFER] Checking offer containments'); if (onlyCards) { receiveCardAmount = offer.itemsToReceive.length giveCardAmount = offer.itemsToGive.length if (receiveCardAmount == 2) { console.log('[OFFER] Received items = 2'); if (giveCardAmount == 1) { console.log('[OFFER] Given items = 1'); offer.accept(); client.chatMessage('76561198259000054', 'Trade offer #' + offer.id + ' from ' + offer.partner.getSteamID64() + ' accepted. 2 new cards in inventory'); tradelog.info('Trade offer #' + offer.id + ' from ' + offer.partner.getSteamID64() + ' accepted. 2 new cards in inventory') console.log('[OFFER] Accepted - contains correct items'); } } } else { offer.decline(); console.log('[OFFER] Declined - contains non card items or not the correct amount'); tradelog.info('Offer #' + offer.id + ': Declined - contains non card items') } } }); }); My offer gets declined even though I'm sure I matched everything. I think it's with the tags but it might be a problem with the item amount
  10. manager.on('newOffer', function (offer) { console.log('New offer from ' + offer.partner.getSteamID64()); tradelog.info('Incoming offer from ' + offer.partner.getSteamID64()) if (offer.partner.getSteamID64() === '76561198259000054' || offer.itemsToGive.length === 0) { offer.accept(function (err) { if (err) { console.log('Can not accept offer #'+ offer.id + err.message); } else { console.log('Trade offer #' + offer.id + ' from ' + offer.partner.getSteamID64() + ' accepted'); } }); } else { offer.decline(); console.log('Offer #' + offer.id + 'sent by ' + offer.partner.getSteamID64() + ' declined, is not a gift/owner offer') } }); This the script i currently have. When i send an gift offer, it gets accepted and logged correctly. But when I send an offer from my main account (I'm sure the steamid64 is right) it logs in the console it got accepted, doesn't give an error. But if i look at Steam the offer isn't aaccepted.
  11. Is it possible to make an if statement like client.on('friendMessage', function (steamID, message) { if (message.match('!logoff') { if (steamID == 76...) { client.sendMessage(steamID, 'logging off.') client.logOff(); } else { client.sendMessage(steamID, 'Sorry, this is an owner-only command' } } }); I just quickly made this script so if there are some errors, I didn't try exactly this script but i tried a script very similar. This part was the same: if (steamID == 76...) { And if there's an option it should be easy to make allow everyone except for 1 steamid/user by just changing == in !== right.
  12. Hello. I have a small problem... Sometimes the bot crashes with an error "Cannot read property 'player_name' of undefined" Here is my code: bot.on('friendsList', function() { for (var steamID in bot.myFriends) { if(bot.myFriends[steamID] === 2) { bot.getPersonas([steamID], function(getName) { var friendName = getName[steamID].player_name; //Some code }); } } }); Where I erred ?
  13. Hello, sorry for my english i have a problem with steam bot login.. my bot working with no problem on nodejs for windows but on nodejs on freebsd(host) i have problems.. : my 2fa code generated is invalid.. idk why.. and i can't logon on host.. look on my script ` var TOTP_UserConfig = {"shared_secret":"xxxxxxxxxxxxxxxxxxx/1k/E=","serial_number":"xxx...etc etc (mAfile) var client = new SteamUser(); var code = SteamTotp.generateAuthCode(TOTP_UserConfig.shared_secret); var logOnOptions = { "accountName": "y", "password": "x", "twoFactorCode": code }` He give me 2fa code but is invalid.. thx for help https://github.com/DoctorMcKay/node-steam-user/issues/100
  14. Hey, Running into a bit of an issue sometimes with persona_state, it's sometimes null for some reason. Code: Bot.prototype.sendMessage = function(steam_id, send_offline, message) { if (this.client.myFriends[steam_id] === undefined || this.client.myFriends[steam_id] === 2 || this.client.myFriends[steam_id] === 4) { log.error(this.data.name, 'The message recipient is not a friend.'); return false; } this.client.getPersonas([steam_id], (personas) => { if (send_offline == false && personas[steam_id].persona_state == 0) { log.info(this.data.name, 'The recipient is offline, and the request has disabled offline sending.'); return false; } else { // temp. debug log.info(this.data.name, 'Name: ' + personas[steam_id].player_name + ', State: ' + personas[steam_id].persona_state); } log.info(this.data.name, 'Sending the message...'); this.client.chatMessage(steam_id, message); log.success(this.data.name, 'Success!'); return true; }); }; What could cause this? The player it tries to send the message to is a friend, so that's not the issue.
  15. How would I go with registering a free to play game into the account because it will not play anything not in the account.
  16. Is their a counterpart within steam-user to allow the removal of a member of a group? For context - I have a clan of 100+ CS:GO players and we're currently using the bot to fetch the ranks of each member and invite them to a rank-based sub-group. Over time their rank has the potential too change and as a result they'll need removing from the old group and inviting to a new one. I've written code to this effect but can't find a removeFromGroup(userSteamID, groupSteamID) I accept I may need to code something myself but don't want to reinvent the wheel. Also given how comprehnsive steam-user is.. if it has been ommited I suspect their may be a valid reason I should be aware of before embarking on my own effort.
  17. Hi There, I've created a script to get some info about a users account. getOwnedApps() and ownsApp() is really nice but I would like to understand more about licenses and getProductInfo. licenses: How do we know what this package is? Is there anyway to look it up? client.on('licenses', (licenses) => { //console.log(licenses.length); console.log(licenses[0]); }); Returns the below. { package_id: 15740, time_created: 1487406101, time_next_process: 0, minute_limit: 0, minutes_used: 0, payment_method: 1, flags: 0, purchase_country_code: 'AU', license_type: 1, territory_code: 55, change_number: 1796623, owner_id: 633543528, initial_period: 0, initial_time_unit: 0, renewal_period: 0, renewal_time_unit: 0 } getProductInfo What are all the object responses in appinfo? function getProd(){ client.getProductInfo([730],[],function(res){ console.log(res); }); Returns: { '730': { changenumber: 2713931, missingToken: false, appinfo: { appid: '730', common: [Object], extended: [Object], config: [Object], install: [Object], depots: [Object], ufs: [Object] } } }
  18. When Web session expired i use webLogOn() create new session , but event webSession not fire . Thanks !
  19. Hi There, After creating a new account and calling client.requestValidationEmail I am not getting any result or error. I notice that a NewUser is given a prefix = [a:1 whereas a user = [u:1 Do I need to logoff and logon as the new user first?
  20. Hi There, Having a callback issue with the changeEmail command. Any help would be very appreciated. Code: (logOnOptions removed) function ChangeEmail(password){ client.changeEmail(password, myemail, function(err) { console.log(err); emailDone = true; // just a poor handler, still get error without it. }); } client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); ChangeEmail(password); }); Error: /node_modules/steam-user/components/account.js:143 callback(Helpers.eresultError(body.eresult)); ^ TypeError: callback is not a function I have also tried simplifying to: client.changeEmail(password, myemail);
  21. Firstly, thanks for the great work on steam-user. It's great. I'm having some issues with getting my friends list, having read the docs I understand it can be accessed via myFriends. I've tried the following but it keeps returning undefined. function getMyFriends(callback) { if(err) return callback(err); if(!user.myFriends) callback(null,user.myFriends) } What event do I need to wait for to ensure it holds something?
  22. My bot was running fine until today. Suddenly steam started sending HTTP 429 and when i restarted, it never fires webSession event any more. Any ideas?
  23. If i don't add the callback handler i got the result = 6 (LoggedInElsewhere) , but if i add the callback handler it goes to the first result: (console.error("Error: Logon failed, Invalid Password or playing in the account." ) . Any tips?
  24. I need to make sure the recipient is online before I message him. I have loooked for this and this is what I found: client.getPersonas([SteamID], function (persona) { PersonaState = persona[SteamID].persona_state; console.log(PersonaState); This returns null no matter what state I set for myself. I am very new to node. Not sure where to look, there are no errors in the code. I am friends with the bot and he is able to message me and recieve my messages. It works but I dont want him sending me message when my account is offline which it currently does.
  25. I have x accounts for which I need to create a SteamUser client. I did some quick testing and found that the following code is not working. Any suggestions on why? var initializeClients = function(data) { var steamuser = require('steam-user'); var steamtotp = require('steam-totp'); var steamtrader = require('steam-tradeoffer-manager'); var client = []; var manager = []; for (var index in data) { var account = data[index]; client[index] = new steamuser(); manager[index] = new TradeOfferManager({ "steam": client[index], "domain": "example.com", "language": "en" }); client[index].logOn({ 'accountName': account.username, 'password': account.password, 'twoFactorCode': totp.generateAuthCode(account.shasec) }); }; }; //x minutes/hours later this function gets called var clientLogOff = function(index) { client[index].logOff(); } Thanks in advance for any input on this.
×
×
  • Create New...