African Posted May 21, 2017 Report Share Posted May 21, 2017 Hello all, I just finished working on a bot using this tutorial. After trying to use it I noticed from debugging this: Exception has occurred: Error TypeError: Cannot read property 'on' of undefined at Object.<anonymous> (c:\node\tradebot.js:127:15) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Timeout.Module.runMain [as _onTimeout] (module.js:604:10) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5) Here is the code causing the error. client.friends.on('relationships', function(){ After closely looking at the comments in the guide I saw McKay said this: client.friends was removed in node-steam-user v2.0.0. You’ll want the newest v1.x.x, which is 1.13.0. So to fix the issue do I download the github repo for steam-user and override mine with the 1.13.0 version? Otherwise how would you go about doing things involving friends without using client.friends.on() ? Thanks for your time and help Quote Link to comment Share on other sites More sharing options...
African Posted May 22, 2017 Author Report Share Posted May 22, 2017 I figured it out on my own Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.