Jump to content
McKay Development

bossikkk

Member
  • Posts

    7
  • Joined

  • Last visited

Posts posted by bossikkk

  1. Hey. I need help. My bot is randomly or after spamming Session Expired will be disconnect. At the same time internet-connection is stable. Why is this happening?

    Logs: http://ibb.co/gvnUyR     http://ibb.co/hnA2k6

     

    Code:

     

    community.on('sessionExpired', function (err) {
        console.log("## Session Expired, relogging.");
        client.webLogOn();
    ​});

     

    setInterval(function () {
        count++;
        console.log("## Session: " + count + ", relogging...");
        client.webLogOn();
    },  10 * 60 * 1000);

     

    client.on('disconnected', function (eresult) {
        console.log("Disconnected from Steam. Reason '"+SteamUser.EResult[eresult]+" ["+eresult+]'");
    });

     

    client.on('webSession', function (sessionID, cookies) {
        manager.setCookies(cookies, function (err) {
            if (err) {
                console.log(err);
                process.exit(1);
            } else {  
                community.setCookies(cookies); 
                community.chatLogon();
                inv.getInventory(client.steamID).then(inventory => {
                    currentInventory = inventory;
                    client.gamesPlayed("B: " + (1000 - Object.keys(currentInventory).length) + " ? " + config.prices.buying_price + " руб | S: " 
                                        + Object.keys(currentInventory).length + " ? " + config.prices.selling_price + " руб");
                })
                .catch(err => {
                    console.log(err);
                });
            }
        });
    });

     

  2. spamming friend request eh ? I wont even try to help since I been getting spam friend request from scam bots. And i think very less people will like what you are doing and probably wont help

    Sorry but I'm not asking how conscientious this is. I just have two question: How do I get a list of other user's friends? Is this possible do with the help of DoctorMcKay's modules ?

  3. There is method "add freind"

    client.addFriend("steamID", function(err) {
    if (err) {
    console.log(err.message);
    } else {
    console.log("OK");
    }
    });

    But how get list of other user's friends? To send a request to each of them.

  4. Hello! How to implement this function:
     

    So for example sets lets say your profile id number is 1234567892 
    The bot is told to get the first number 
    1234567890 
    It ads it to the profile link and gets 
    http://steamcommunity.com/profiles/1234567890 
    Then the coding tells the bot to load the page and look for error messages 
    Error message found, it now goes to the next one... 
    1234567891 
    it loads up http://steamcommunity.com/profiles/1234567891 
    gets an error message 
    it loads up http://steamcommunity.com/profiles/1234567892 
    It doesn't get an error message. Code for the bot now tells it to load the code for adding the account as a friend. 

  5. Have you sent/accepted the offer already?

     

    Yeah I forgot to add:

    offer.accept(function(err, status) {
        if (err) {
            console.log(err.message);
            return;
        }
        console.log("Current trade status: " + status);
    });
    

    in newOffer event. Now it's work perfectly. So that not to create another topic. You can tell me how to do anti-spam in event friendMessage? For example stop event on 10 sec and in this time other !commands won't work.

  6. in class Bot:

    confirmTrade(offer_id) {
        return new Promise((resolve, reject) => {
            this.community.acceptConfirmationForObject(this.identity_secret, offer_id, (err) => {
                console.log(this.identity_secret);
                console.log(offer_id);
                if (!err) {
                    return resolve("Successfully confirmed trade #" + offer_id);
                } else {
                    return reject(err.message);
                }
            });
        });
    }

    Call:

    bot.confirmTrade(2541735824).then(resultAccepting => {
        console.log(resultAccepting);
    }).catch(errAccepting => {
        console.log(errAccepting);
    });

    I use SDA and get identity_secret from maFile. Don't know why code not work. I see identity_secret and offer_id in console, but i receiving "Could not find confirmation for object".

     

     

    d0kvJbFsQs2_JWqFGOSguA.jpg

     

     

×
×
  • Create New...