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. Solution for getting appOwnershipChached apps' name instead of appid. I got config.default_apps by using an empty Steam account to get the numerical list of apps each account has by default and on that line I compare that default list to the list of the fetched user account which might have some games and then filter to remove the default apps. //get GAME LIST client.on('appOwnershipCached', async() => { try { const appIDs = await client.getOwnedApps() let gameList = appIDs.filter((game) => { // remove default apps from list return !config.default_apps.includes(game) }) const appDetails = await client.getProductInfo(gameList, []) let appData = appDetails.apps let arr = await Object.keys(appData).map(key => { // convert list to array return appData[key] }) let cleanGameList = [] await arr.forEach(app => { // push only app names into array if (app.appinfo.common !== undefined) { // necessary only .common since .common.name gives TypeError cleanGameList.push(app.appinfo.common.name) } }) log(cleanGameList) } catch(err) { log(err) } }) Well, I've been trying/searching different things for hours now without any sufficient results. I am trying to get the name of the app/game instead of the appid number via appOwnershipCached. I am actually trying to get the games in the users account instead of also apps and default apps that come with a Steam account. I managed to get the names with an npm package called appid, but it takes a while until it converts all of them since it's fetching it from Steam API, so unfortunately it's not an option and I've run out. So I have two questions: Is there a way to get an apps' name instead of appid? Is there a way to get only the games without apps and default apps? Edit: I actually managed to filter it to the point until I get only the games in my library. I basically filter default apps from the appOwnershipCached fetch of appIDs and then if the appID has a name, it puts it into the gameList array. But the problem is, some games seem not to have names, why is that? For example: Rocket League only has { appid: '252590', public_only: '1' } on .appinfo... OLD NOT WORKING //get GAME LIST client.on('appOwnershipCached', async() => { try { const appIDs = await client.getOwnedApps() log(appIDs) let gameList = appIDs.filter((game) => { return !config.default_apps.includes(game) }) log(gameList) accountData.games = await gameList // log("my games: " + accountData.games) const appDetails = await client.getProductInfo(gameList, []) // ROCKET LEAGUE TEST const rl = await client.getProductInfo([252590], []) log(rl.apps[252590].appinfo) // let appData = appDetails.apps // log(appData) let arr = await Object.keys(appData).map(key => { return appData[key] }) // log(arr) let cleanGameList = [] await arr.forEach(app => { if (app.appinfo.common.name != null) { // log(app.appinfo.common.name) console.log("list: ", cleanGameList) return cleanGameList.push(app.appinfo.common.name) } }) } catch(err) { log(err) } })
  2. Hi im looking for a sample code to extract steam ids from a gameserver
  3. Previously, everything worked and remained. now does not want to save the file. rememberPassword is on
  4. Guest

    user using phone

    Hi, how can i know that user online by phone ? Can i know it using event "user" ?
  5. Hello, I'm using only 'node-steam-user' library and sometimes (randomly, not only during Tuesday maintenance) my script is crashing when I'm doing 'client.webLogOn();' (I'm doing it in intervals to keep my session alive - just in case every 30 minutes) sometimes I'm getting this error (very rare case): /node_modules/steam-user/components/web.js:10 throw new Error("Cannot log onto steamcommunity.com without first being connected to Steam network"); is there any method that instead of crashing app I can try to login account again with 'client.logOn'? because I don't want to check my VPS if script got crashed or no (I want to run it constantly without worring that something crashed there) something with try, catch method?
  6. Hello, I am using latest verision of steam-user 4.12.2 i am trying to use the new steam chat features /pre, /code, /quote etc So i have already tried alot and i found that only /me works no others if i create a message for example "/quote Processing your request" so the bot replies with plain text "/quote Processing your request" Thanks in advance
  7. Hello, for some reason I can't login on any Steam accounts. — Node.js version: 12.4.0 / 8.16.0 node-steam-user version: 4.12.2 — Debug log (first part, then it repeat immediately inf. amount of times): Connecting to TCP CM: 155.133.230.34:27019 TCP connection established Handled message: ChannelEncryptRequest Channel encrypt request: protocol 1, universe 1, nonce 2c1378e10fb52fd105a21685874390d8, 0 remaining bytes Sending message: ChannelEncryptResponse Handled message: ChannelEncryptResult Sending message: ClientLogon Handled message: ClientLogOnResponse Log on response: TryAnotherCM Code: console.log('> Loading, please wait.') const SteamUser = require('steam-user') const client = new SteamUser() const logOnOptions = { accountName: '***', password: '***', } console.log('> Loaded, logging in.') client.logOn(logOnOptions) client.on('loggedOn', () => { console.log('> Logged into Steam.') client.setPersona(SteamUser.Steam.EPersonaState.Online, 'aeonix.space') client.gamesPlayed('Idling', 730) }) client.on('debug', console.log)
  8. Hi, I'm trying to make my bot work but I have the following error: C:\Users\Admin\Desktop\123456789\SteamCardBot-master\index.js:91 console.log("## Logged in as #" + client.steamID + " (" + personas[client.steamID].player_name + ")"); ^ TypeError: Cannot read property '[object Object]' of null at client.getPersonas (C:\Users\Admin\Desktop\123456789\SteamCardBot-master\index.js:91:75) at Immediate.setImmediate (C:\Users\Admin\node_modules\@doctormckay\stdlib\components\promises.js:24:6) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5) What am i missing? I've thislet client = new SteamUser(),manager = new TradeOfferManager({"steam": client,"language": "en","pollInterval": "10000","cancelTime": "7200000" // 2 hours in ms}),community = new SteamCommunity(); This is the logg client.logOn({accountName: CONFIG.USERNAME,password: CONFIG.PASSWORD,twoFactorCode: SteamTotp.getAuthCode(CONFIG.SHAREDSECRET),rememberPassword: true}); client.on("loggedOn", (details, parental) => {client.getPersonas([client.steamID], (personas) => {console.log("## Logged in as #" + client.steamID + " (" + personas[client.steamID].player_name + ")");});client.setPersona(1);}); client.on("webSession", (sessionID, cookies) => {manager.setCookies(cookies, (ERR) => {if (ERR) {console.log("## An error occurred while setting cookies.");} else {console.log("## Websession created and cookies set.");}});
  9. Hi, getting error when user change state TypeError: Cannot set property 'rich_presence' of undefined at node_modules/steam-user/components/friends.js:724 at processTicksAndRejections (internal/process/task_queues.js:86)
  10. I am new in node js, i start 2 days ago. Is that possible to create multiple specific input message? steam chat a: hello bot: !mymoney, !checkname [gameid] a: !checkname 440 bot: Team Fortress 2 a: !checkname 570 bot: Dota 2 node.js code ..... client.on("friendMessage", function(steamID, message) { if (message == "!mymoney") { client.chatMessage(steamID, duitgw) } else if (message == "!checkname"){ if (message.line2 == "440"){ //like this ..... } else if (message.line2 == notnumber){ //another condition .... } else if (message.line2 == isnt set){ //another condition .... } } else{ client.chatMessage(steamID, "!mymoney, !checkgame [gameid]") } }); ..... edit: i use comment for highlight
  11. This is my question, if somebody can help me I would be grateful!
  12. When working with your library there was a difficulty... How can i promise example here: botInfo = {}; client.logOn(logOnOptions); client.on('wallet', function(hasWallet, currency, balance) { botInfo.balance = balance; }); client.on('emailInfo', function(address, validated) { botInfo.emailAddress = address; botInfo.emailValidated = validated; }); console.log(botInfo); // i want to log data after fill info no one promise don't work....
  13. Hello, I have migrated from SteamKit to node-steam-user to be able to interface with the new steamchat. I had a chatbot that made heavy use of a 'group chat' in order to notify administrators of reports in-game (via a plugin) and provide them with all the info via steam without any other access needed (authorized via steamid, only 'members' can join chat group) I was interested in making use of the chatroom channels feature of the new steam groups to keep everything tidy, however looking over the methods available to me, this is not possible (or I am blind and didnt see it) are there any plans on adding a way to 'create a channel' in a steam group chat? Here is the flow of what I want to do, but currently it looks like there is no way for a bot to 'manipulate' the channels to make this possible. User submits report Bot sees new report in database, creates channel #report-$id Bot notifies online admins of #report-$id Admin(s) investigate report, close report after being handled. Bot closes/deletes channel after timestamp is 24h old.
  14. Guest

    event user not emitted

    Hi. Event "user" not emitted when you accepting friend invite using method client.addFriend, but emitted when user accepting your invite
  15. Hello, I'm new to Node.js progamming and I'm trying to make a Steam gifting bot, that would add people, buy the gift and send it to them. Is it possible to do it using only node-steam-user or do I need more packages? Any threads/tips/documentation would be appreciated.
  16. Hello, I've been recently trying to use steam-user to login, and fetch an auth session ticket. After converting the result of the function into hexadecimal and trying to authenticate through steam, I get an "Invalid ticket' error from steam. Any ideas on what I could be screwing up on?
  17. Hi there, I'm using steam-user to try to make a bot, but I cannot get it to set it's status to online. Furthermore, is there a way to check if the login was successful as the loggedOn event appears to trigger even if I try entering bogus account details. Code is as follows: const SteamUser = require ("steam-user");const SteamTotp = require ("steam-totp");const config = require("./config"); const client = new SteamUser();const details = {accountName: config.accountName,password: config.password,twoFactorCode: SteamTotp.generateAuthCode("redacted"),rememberPassword: true}; client.logOn(details); client.on("loggedOn", () => {console.log("signed in");client.setPersona(1);})
  18. Hi all, I am trying to send a game invitation friend message using node-steam-user. I am using sendFriendMessage function with EChatEntryType option established as 3 (InviteGame value at https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EChatEntryType.js) const SteamUser = require('steam-user'); const client = new SteamUser(); client.chat.sendFriendMessage("steam64Id Here", '[lobbyinvite appid="App Game IdHere" lobbyid="Lobby Id Here"][/lobbyinvite]', {chatEntryType: 3});The result is that there is no invitation sent in steam chat I supposted to fill the message parameter like that because of im getting the lobbies invitation history chat in that format. I saw all node-steam-user docs and i did not found any tutorial or explain about how to use this function with EChatEntryType as InviteGame value. ¿how can i use this function to send a game lobby invitation message to a friend? ¿What data and would be the message parameter format in the function? Thanks in advance,
  19. client.gamesPlayed does not play the first entry of the array. let string = "string here"; let stringed = string.toSting(); // to make sure it is really a string var games = [stringed, 730,......] client.gamesPlayed(games) and yet it onlines with CSGO.
  20. Why is this node module so much lag? When I type command it takes my bot slower than usual to reply, like 3/4th of a second, even when I see other bots on steam reply in like a tenth of a second. My bot isn't even that complicated and i'm running it on a pretty powerful computer. Is there anything else that I might be do wrong or is this what i get for using a legacy module
  21. So I want to create a very simple discord bot. I already have it running except I cannot figure out how to integrate this library properly. I want the bot to simply retrieve the amount of players on a certain steam game and then return the amount of players. Here's my code so far: const SteamUser = require('./node-steam-user-master/index.js');var user = new SteamUser(); user.login({"accountName": "","password": ""}); user.on('loggedOn', function(details){console.log(user.steamID);}) I will also note I have been getting an error when I try to run this code (I do have the accountName and password fields filled in on my actual program) This is the error I get: ---------------------------------------------------------------------------------------------------------------------- internal/modules/cjs/loader.js:638 throw err; ^ Error: Cannot find module '@doctormckay/stats-reporter' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (D:\Discord_Code\bot\node-steam-user-master\index.js:1:1) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3)---------------------------------------------------------------------------------------------------------------------- So that's my first problem, but the other is how do I use the getPlayerCount Method? I'm assuming I need to use a different constructor because the SteamUser doesn't seem to have that method available. Any help would be appreciated, thanks.
  22. Can I change my steam url ex. https://steamcommunity.com/id/{user}/with this application?
  23. Hey, I have been trying to fiddle around with the GC for CSGO a bit but noticed that the callback in "sendToGC" never runs. The event works fine but the callback never happens. const SteamUser = require("steam-user"); const user = new SteamUser(); user.logOn({ accountName: "Account", password: "Password" }); user.on("loggedOn", () => { console.log("Logged in"); user.gamesPlayed(730); }); user.on("appLaunched", (appID) => { setInterval(() => { console.log("Attempting hello for " + appID); user.sendToGC(appID, 4006, {}, Buffer.alloc(0), (appID, msgType, payload) => { console.log("Got " + msgType + " from callback"); }); }, 3000); }); user.on("receivedFromGC", (appID, msgType, payload) => { console.log("Got " + msgType + " from event"); }); Above is example code which I am trying to run, everything I get is "Got 4004 from event" but never from the callback. I noticed that the "++this._currentGCJobID" in "components/gamecoordinator.js" always returns NaN, maybe that helps somehow. I am unsure but I might also just be doing something wrong.
×
×
  • Create New...