Jump to content
McKay Development

metzz

Member
  • Posts

    2
  • Joined

  • Last visited

metzz's Achievements

  1. Already Fixed it, I saw the documentation and function needed to have err, as soon as i added error it worked! please DELETE my post.
  2. [ALREADY FIXED, PLEASE DELETE THIS POST.] Hello, im starting to learn nodejs and I have a problem if you could help me would be amazing! So I made this Steam Bot, which IDLE's a game and receives, responds to steam messages. But im trying to log everything in my console, like who sent me the message and whats the content of it. Ive searched for and found another guy who had this problem but for me it didnt fix it, this is my code: client.on("friendMessage", function(steamID, message) { client.getPersonas([steamID], function (personas) { const persona = personas[steamID.getSteamID64()]; const name = persona ? persona.player_name : (steamID.getSteamID64()); if (message != 'null') { client.chatMessage(steamID, config.mensagemAutomatica); console.log("Message received:", message,"||", "From:", name); } }) }); So whenever someone sends me a message, im getting the following error: const persona = personas[steamID.getSteamID64()]; ^ TypeError: Cannot read property '76561198171125906' of null at C:\Users\Administrator\Desktop\coding\steam-bot\bot.js:42:33 at Immediate.<anonymous> (C:\Users\Administrator\Desktop\coding\steam-bot\node_modules\@doctormckay\stdlib\components\promises.js:24:6) at processImmediate (internal/timers.js:439:21) Id appreciate any help!
×
×
  • Create New...