Jump to content
McKay Development

Search the Community

Showing results for tags 'node.js'.

  • 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. code: user.changeEmail({ "password": password, "newEmail": newEmail }, function(err, needsSmsCode) { if(!err) { user.changeEmail({ "password": password, "newEmail": newEmail, "code": emailcode, "twoFactorCode": code }, function(err, needsSmsCode) { if(err) { console.log(err); } else { console.log('ok'); } }); } }); error: { Error: InvalidParam at Object.exports.eresultError (/root/bot/node_modules/steam-user/components/helpers.js:75:12) at /root/bot/node_modules/steam-user/components/account.js:129:21 at Object.cb (/root/bot/node_modules/steam-user/components/messages.js:174:4) at CMClient._netMsgReceived (/root/bot/node_modules/steam-client/lib/cm_client.js:321:26) at CMClient.handlers.(anonymous function) (/root/bot/node_modules/steam-client/lib/cm_client.js:603:8) at CMClient._netMsgReceived (/root/bot/node_modules/steam-client/lib/cm_client.js:305:24) at emitOne (events.js:116:13) at TCPConnection.emit (events.js:211:7) at TCPConnection._readPacket (/root/bot/node_modules/steam-client/lib/tcp_connection.js:183:7) at emitNone (events.js:106:13) eresult: 8 } with steamGuard is fine
  2. community.getGroupHistory(gid,page, (err,history)=>{ if(!err){ console.log(history); } else { console.error(err); } }); I wrote this code but you do not have the permissions to access this group attribute to me. showed error. gid = "103582791462876010";
  3. It just isn't being sent. I even get a SteamGuard e-mail correctly sent beforehand, so I know that's working. I've tried with multiple accounts. > Successfully logged in> Address: <e-mail>> Successfully sent e-mail I figured that e-mail info not being emitted yet could be the problem, but as you can see I tested that and it comes out fine. The docs say that if there's a mobile authenticator, the function will return true but not do anything. But none of the accounts have a mobile authenticator. I'm using 3.28.1, the latest version as of posting this. I'm convinced there's just a bug. Am I wrong? er
  4. I would like to know where is the variable to determine these normal 7 day tradeholds in csgo.
  5. Hello guys, I want to create steam market bot and now I have a problem with selling items function. community.httpRequestPost('https://steamcommunity.com/market/sellitem/',options, (err, response, json) => { if(err) { console.log(err.toString()); return; } console.log(json); }, "steamcommunity"); This is how i run it. var options = { url: 'https://steamcommunity.com/market/sellitem/', headers: { 'Origin': 'https://steamcommunity.com', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', 'Referer': 'https://steamcommunity.com/my/inventory/', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'ru,en-US;q=0.8,en;q=0.6,en-AU;q=0.4' }, form: { sessionid: community.getSessionID(), appid: 218620, contextid: 2, assetid: 1893071216426009763, amount: 1, price: 2000, } }; And the options (Payday2 crate). The error I get: {"success":false,"message":"There was a problem listing your item. Refresh the page and try again."} I can not understand where the problem is, wanna know your opinion about it. Thank you, Anton
  6. community.postUserComment(steam, ':metallove: sɪɢɴᴇᴅ ʙʏ ʀᴇᴅᴅʏ sɪɢɴᴇᴅ ʙʏ ʀᴇᴅᴅʏ , ғᴜɴᴅᴀᴅᴏʀ ᴅᴀ ᴄᴏᴍᴜɴɪᴅᴀᴅᴇ ᴄʜᴇᴀᴅᴄᴏᴍᴍᴜɴɪᴛʏ :metallove:') ^ ReferenceError: community is not defined at SteamUser.<anonymous> (/root/bot/bot.js:275:9) at SteamUser.emit (events.js:187:15) at SteamUser._emitIdEvent (/root/bot/node_modules/steam-user/components/utility.js:29:12) at SteamUser._handlers.(anonymous function) (/root/bot/node_modules/steam-user/components/chat.js:281:9) at SteamUser._handleMessage (/root/bot/node_modules/steam-user/components/messages.js:249:30) at CMClient.emit (events.js:182:13) at CMClient._netMsgReceived (/root/bot/node_modules/steam-client/lib/cm_client.js:323:8) at CMClient.handlers.(anonymous function) (/root/bot/node_modules/steam-client/lib/cm_client.js:603:8) at CMClient._netMsgReceived (/root/bot/node_modules/steam-client/lib/cm_client.js:305:24) at TCPConnection.emit (events.js:182:13) config bot: client.on("friendMessage", function(steam, message) { if (message == "!assinar") { client.chatMessage(steam, "O Teu perfil agora está assinado por mim. Aproveita") community.postUserComment(steam, ':metallove: sɪɢɴᴇᴅ ʙʏ ʀᴇᴅᴅʏ , ғᴜɴᴅᴀᴅᴏʀ ᴅᴀ ᴄᴏᴍᴜɴɪᴅᴀᴅᴇ ᴄʜᴇᴀᴅᴄᴏᴍᴍᴜɴɪᴛʏ :metallove:')}})
  7. community.uploadAvatar({ "image": "http://cdn.akamai.steamstatic.com/steamcommunity/public/images/avatars/c1/c15b424d91295560708c526a20c4e2fab306edab_full.jpg", "format": "jpg" }) i tried it but it doesn't work. Anyone can help me please.
  8. "null" Docs say "Emitted on logon and when email info changes. The emailInfo property will be updated after this event is emitted." Isn't updating, though. Here's what `details` returns: "{ eresult: 1, out_of_game_heartbeat_seconds: 9, in_game_heartbeat_seconds: 9, public_ip: 387010462, rtime32_server_time: 1515897127, account_flags: 2101381, cell_id: 133, email_domain: null, steam2_ticket: null, eresult_extended: null, webapi_authenticate_user_nonce: 'VqFP8k12n6gM+8pbZf8', cell_id_ping_threshold: 11, use_pics: true, vanity_url: 'projectcrate8050', client_supplied_steamid: Long { low: 845356646, high: 17825793, unsigned: true }, ip_country_code: 'CA', parental_settings: null, parental_setting_signature: null, count_loginfailures_to_migrate: 0, count_disconnects_to_migrate: 0, ogs_data_report_time_window: null, client_instance_id: Long { low: -220505765, high: 776833051, unsigned: true }, force_client_update_check: null }"
  9. Is there any open source code for deleting the crates automatically?
  10. Okay, forgive me, but I am a bit confused about this. I've tried looking for better examples or documentation, but it didn't clear things up for me. I have a few questions: Is the id property of a gift object (e.g. an item from gifts from the gifts event) the same as an assetid of an CEconItem? You seem to use these terms interchangeably in your documentation, but I am not sure. Without knowing the answer of the first question, can/should you use community.redeemGift with the gift.id as first parameter? Let say I am doing the thing question 2 is asking about, in the gifts event. Why is it that after sending a trade offer where I'd receive a steam gift, not automatically redeem a steam gift when offer is accepted? * What should I do for the scenario mentioned in question 3, or if I receive a trade offer with 1 or more steam gifts, which I accept (using trade offer manager)? ** I realized that the gifts event is only for when gifts are sent directly to me, and not via trade offers (as they get sent to inventory). So, in case of trade offers, after accepting a trade with trade offer manager, I should use offer.getReceivedItems to check if they contain steam gifts and redeem them? How do I do that exactly? I assume I check for some property of CEconItem item of the received items to see if it's a steam gift and then use community.redeemGift(item.assetid, ...)? But which property and what value? ** ** Found out I should check for property type (https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#type) with value Gift. Should I only call offer.getReceivedItems after trade offer has been accepted AND confirmed? Or can you do it also for unconfirmed accepted?
  11. Hi, I searched on the forum, but i didn't find any problem or question like this. I want to run a function, when a friend start a specified appid. With other library (seishun's node-steam) I made like this: steamFriends.on('personaState', function(friendObj) { if (typeof(steamFriends.personaStates[friendObj.friendid]) != 'undefined') { // If player started CS:GO if (friendObj.gameid != steamFriends.personaStates[friendObj.friendid].gameid && friendObj.gameid == 730) { function(); } } }); But with node-steam-user lib I tried it with this: client.on('user', function(steamid, friendObj) But I didn't find the way, how I can run it only once, not every game update. Ex. join to lobby in cs:go.
  12. Hi Dr.Mackay, first of all thanks for your library and the hard work you've done . I've been thinking about making a project which would need to auto-download game from the user library, by this i mean, i could sign in through steam, and use your library to get all game info, would be possible to automate the process of downloading the game into imagine, a remote server without having to interact to a UI Steam client directly? Another think would be interesting is to interact with updates in games, by knowing what games require updates before an instance could be launched in the machine that previously has downloaded the game. All of this in case the first one is even possible, don't know if a future feature in your lib could fit or if i'm speaking about other completely thing, hope not . Sorry for my English, i'm not native and again thanks for your time!
  13. global._mckay_statistics_opt_out = true; // opting out any statistical collection program // modules being used const SteamUser = require("steam-user"); const path = require("path"); const fs = require("fs"); const config = require(path.join(__dirname, "config.js")); process.on('unhandledRejection', (reason, p) => { console.error(reason, 'Unhandled Rejection at Promise', p); }).on('uncaughtException', err => { console.error(err, 'Uncaught Exception thrown'); }); const appTokens = fs.existsSync(path.join(__dirname, "apptokens.json")) ? JSON.parse(fs.readFileSync(path.join(__dirname, "apptokens.json"), "utf8").toString() || "{}") : {}; const depotKeys = fs.existsSync(path.join(__dirname, "depotkeys.json")) ? JSON.parse(fs.readFileSync(path.join(__dirname, "depotkeys.json"), "utf8").toString() || "{}") : {}; const running = { apptokens: false, depotkeys: false, }; const user = new SteamUser({ enablePicsCache: true }); user.logOn(config.loginAnonymous ? undefined : require(path.join(__dirname, "login.js"))); // logging in using your username and password, more info about this function: https://github.com/DoctorMcKay/node-steam-user/blob/master/components/logon.js#L9 user.on("loggedOn", () => { console.log("Logged onto Steam as " + user.steamID.getSteamID64()); const chunksize = 10000; // seems best chunk size const idList = []; for (let i = chunksize; i < 1000000; i += chunksize) { const idSubList = []; for (let j = i - chunksize; j < i; j++) { idSubList.push(j); } idList.push(idSubList); } // doing this for all appids or packages just hangs forever running.apptokens = true; getTokens(); function getTokens() { const idSubList = idList.shift(); user.getProductAccessToken(idSubList.filter(id => !appTokens.hasOwnProperty(id)), [], (apps, packageTokens, appDeniedTokens) => { console.log("Tokens denied for " + appDeniedTokens.length + " apps of range " + idSubList[0] + "-" + idSubList[idSubList.length - 1]); for (let appid in apps) { if (apps.hasOwnProperty(appid)) { const token = apps[appid].toString(); appTokens[appid] = token; if (token !== "0") { // otherwise it'd be too spammy console.log("App " + appid + ": " + apps[appid].toString()); } } } if (idList.length > 0) { getTokens(); } else { fs.writeFileSync(path.join(__dirname, "apptokens.json"), JSON.stringify(appTokens, null, 4), "utf8"); console.log("Dumped product access tokens to apptokens.json!"); running.apptokens = false; if (!running.apptokens && !running.depotkeys) { console.log("Logging off of Steam"); user.logOff(); } } }); } }); user.on("appOwnershipCached", getDepotKeys); function getDepotKeys() { console.log("App ownership cached. Requesting appinfos..."); let logger = setInterval(console.log, 6000, "Still requesting appinfos..."); running.depotkeys = true; user.getProductInfo(user.getOwnedApps().map(appid => parseInt(appid, 10)), [], true, (apps, packages, unknownApps) => { clearInterval(logger); console.log("Got appinfos of " + Object.keys(apps).length + " apps"); if (unknownApps.length > 0) { console.log("Found " + unknownApps.length + " unknown apps"); } const depots = {}; for (let appid in apps) { if (!apps.hasOwnProperty(appid) || !apps[appid].hasOwnProperty(`appinfo`) || !apps[appid].appinfo.hasOwnProperty(`depots`)) { // skip if no depot info continue; } Object.keys(apps[appid].appinfo.depots).filter(id => !isNaN(id)).forEach(depotid => depots[depotid] = appid); } console.log("Requesting depot decryption keys of " + Object.keys(depots).length + " depots"); for (let depotid in depots) { if (depotKeys.hasOwnProperty(depotid)) { depots[depotid] = true; continue; } const appid = depots[depotid]; try { user.getDepotDecryptionKey(parseInt(appid, 10), parseInt(depotid, 10), (error, key) => { if (error) { console.log("Depot " + depotid + ": " + error.message); } else { depotKeys[depotid] = key.toString("base64"); console.log("Depot " + depotid + ": " + depotKeys[depotid]); } depots[depotid] = true; if (Object.keys(depots).length === Object.values(depots).filter(v => v === true).length) { fs.writeFileSync(path.join(__dirname, "depotkeys.json"), JSON.stringify(depotKeys, null, 4), "utf8"); console.log("Dumped depot keys to depotkeys.json!"); running.depotkeys = false; if (!running.apptokens && !running.depotkeys) { console.log("Logging off of Steam"); user.logOff(); } } }); } catch (error) { console.log(error); depots[depotid] = true; if (Object.keys(depots).length === Object.values(depots).filter(v => v === true).length) { fs.writeFileSync(path.join(__dirname, "depotkeys.json"), JSON.stringify(depotKeys, null, 4), "utf8"); console.log("Dumped depot keys to depotkeys.json!"); running.depotkeys = false; if (!running.apptokens && !running.depotkeys) { console.log("Logging off of Steam"); user.logOff(); } } } } }); } The app token dumping works just fine, but the depot key dumping thows RangeError's left and right: RangeError: Index out of range at checkOffset (buffer.js:851:11) at Buffer.readUInt32LE (buffer.js:913:5) at node_modules\steam-user\components\cdn.js:80:58 at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:439:3) At buffer.js:851. Any idea why? And how we can fix that?
  14. Hi there, Now that Steam has released steam chat like that of Discord, I want to create a bot to play music over voice chat. Does anyone have any idea how to do this? Thanks. Quang,
  15. Hey, is there a way to send comments to workshop items and guides?
  16. Hello, I have a few accounts linked to manager, and I noticed oAuth logins expiring after 1 year after add, and now these accounts which I added 1 year ago, giving me HTTP 401 errors, I need to relog again with steam guard code and it works again. is there any chance to prevent expiring oAuth logins after 1 year?
  17. Hello. Is it possible to get all comments on a Steam profile via some node modules, or I need to scrap html?
  18. Hello I can't find, is possible to buy game as gift for friend?
  19. Valve updated the steam web chat, it seems that its works differently. Anyone has any solution other than understand how this system works, maybe login into the old steam web chat?
  20. is there a way to check if the password of the account is invalid ?
  21. I need add steam-api to my reacr prjct.First I'm running my project with npm start and then I launch steam-user with node steam-api.And when i import steam-user to my react prjct I receive this error https://imgur.com/4xqZZlb My files: Package.json: {"name": "steamx-app","author": "webif","description": "empty","main": "electron/main.js","version": "0.1.0","private": true,"homepage": "./","scripts": {"start": "nf start","steam-api": "node src/steam-api.js","react-start": "react-scripts start","electron-start": "node electron-wait-react","build": "react-scripts build","test": "react-scripts test --env=jsdom","eject": "react-scripts eject","electron": "electron .","ebuild": "yarn build && node_modules/.bin/build"},"build": {"productName": "steamX","appId": "com.steamx.app","extends": null,"electronVersion": "2.0.4","files": ["build/**/*","electron/*"]},"dependencies": {"electron-titlebar": "0.0.3","react": "^16.4.1","react-dom": "^16.4.1","react-router-dom": "^4.3.1","react-scripts": "1.1.4","readline": "^1.3.0","steam-user": "^3.27.1"},"devDependencies": {"electron": "^2.0.4","electron-builder": "^20.19.2","foreman": "^3.0.1"}}steam-api.js: const SteamUser = require('steam-user')var client = new SteamUser()reactjs file: import React, { Component } from 'react'import LoginForm from './LoginForm'import SteamGuardForm from './SteamGuardForm'import '../../steam-api.js' export default class Login extends Component {state = {accountName: "",password: "",steamGuardCode: ""} inputChangeHandler = (event) => {this.setState({[event.target.id]: event.target.value})} loginHandler = () => {// sessionStorage.setItem("promptSteamGuard", true)} render() {return(<div className="welcome-container"><LoginFormaccountName={this.state.accountName}password={this.state.password}inputChange={this.inputChangeHandler}tryLogin={this.loginHandler}/><SteamGuardFormsteamGuardCode={this.state.steamGuardCode}/></div>)}}
×
×
  • Create New...