woepertjes Posted May 17, 2018 Report Posted May 17, 2018 I've tried using removeFriend(steamID), but it doesn't work for some odd reason. my code: function purge() { logger.info(allFriends.length); var counter = 0; for (;counter < allFriends.length; counter++) { bots[botid].bot.removeFriend(allFriends[counter]) } logger.info(allFriends[counter]); logger.info(counter); } The first error i got with this was: verbose: [bot] Received message from bot admin: !purge warn: purge info: 76 F:\va\node_modules\steam-user\components\friends.js:55 this._send(SteamUser.EMsg.ClientRemoveFriend, {"friendid": steamID.getSteamID64()}); ^ TypeError: steamID.getSteamID64 is not a function at SteamUser.removeFriend (F:\va\node_modules\steam-user\components\friends.js:55:69) at purge (F:\va\OFFICIAL TRADE BOT\tradebot.js:561:35) at processMessage (F:\va\OFFICIAL TRADE BOT\tradebot.js:685:21) at SteamUser.<anonymous> (F:\va\OFFICIAL TRADE BOT\tradebot.js:846:13) at SteamUser.emit (events.js:180:13) at SteamUser._emitIdEvent (F:\va\node_modules\steam-user\components\utility.js:29:12) at SteamUser._handlers.(anonymous function) (F:\va\node_modules\steam-user\components\chat.js:281:9) at SteamUser._handleMessage (F:\va\node_modules\steam-user\components\messages.js:239:30) at CMClient.emit (events.js:180:13) at CMClient._netMsgReceived (F:\va\node_modules\steam-client\lib\cm_client.js:323:8) So what i did was, go into the module, search for this specific line and changed the line that was causing errors to this:this._send(SteamUser.EMsg.ClientRemoveFriend, {"friendid": steamID}); after that, i didnt get any errors anymore but the method "removeFriend" still doesn't work as it doesn't remove the friends from the friendslist. any ideas? var allFriends is an array containing steam 64 id's of all the friends. Quote
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.