Jump to content
McKay Development

woepertjes

Member
  • Posts

    7
  • Joined

  • Last visited

Posts posted by woepertjes

  1. 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.

     

  2. Is there a way to get the steam market value (lowest, highest, average) from an item which is in a trade offer?

     

    Still searching far and wide to find something but best way to get an answer to this question is coming to the forum.

     

    Thanks for all replies and answers :)

  3. Is their a function/piece of code that is similar to the following:

    client.on('friendRelationship', (steamid, relationship) => {
                if (relationship === 2) {
                    client.addFriend(steamid);
                }
            });
    

    But instead of it being for friends and friend invites, it being for groups and group invites?

     

     

    Cheers on the info!

  4. I'm trying to make a function, which gets called when the specified command is entered.

     

    function code:

    function tradecases(botid, senderid) {
        var appid = 730;
        var contextid1 = 2;
        
                    bots[botid].offers.loadUserInventory(senderid, appid, contextid1, true, (err, theirInv) => {
                    if (err) {
                        logger.error(err);
                    } else {
                        var theirItem = theirInv
                      bots[botid].offers.offer.addTheirItems({
                          'appid': appid,
                          'contextid': contextid1
                        });
    
                      bots[botid].offers.offer.setMessage('This is an automated tradeoffer for all your trading cards. You can change it if you want.');
                      bots[botid].offers.offer.send((err, status) => {
                          if (err) {
                              logger.error(err);
                      }     else logger.info('sent offer status: ' + status);
                  });
                }
        });
    }
    
    

    Error (error shows up in CMD):

    verbose: [B1] Received message from non-botadmin: !casedonate
    F:\va\Steam bots\main.js:240
                      bots[botid].offers.offer.addTheirItems({
                                               ^
    
    TypeError: Cannot read property 'addTheirItems' of undefined
        at bots.(anonymous function).offers.loadUserInventory (F:\va\
    Steam bots\main.js:240:44)
        at SteamCommunity.<anonymous> (F:\va\node_modules\steamcommun
    ity\components\users.js:342:5)
        at Request._callback (F:\va\node_modules\steamcommunity\compo
    nents\http.js:67:15)
        at Request.self.callback (F:\va\node_modules\request\request.
    js:186:22)
        at Request.emit (events.js:180:13)
        at Request.<anonymous> (F:\va\node_modules\request\request.js
    :1163:10)
        at Request.emit (events.js:180:13)
        at IncomingMessage.<anonymous> (F:\va\node_modules\request\re
    quest.js:1085:12)
        at Object.onceWrapper (events.js:272:13)
        at IncomingMessage.emit (events.js:185:15)
    
    

    Could someone maybe give me advice, help, suggestions on how to fix this error?

     

    Extra info:

    Bots log in perfectly, nothing goes wrong.

    Bots are online.

    There is a second command like this but that one is meant for steam trading cards. This command has the same issues.

     

    All help is appreciated <3

×
×
  • Create New...