Jump to content
McKay Development

Recommended Posts

Posted

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.

 

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...