Jump to content
McKay Development

auto does not send a welcome message


ahmet

Recommended Posts

hello, after adding bot friends, the welcome message sometimes sends, sometimes not, what could be the reason?

 

client.on('friendRelationship', (steamID, relationship) => {
    if(relationship === SteamUser.EFriendRelationship.RequestRecipient) {
        info = 'info';
        client.getPersonas([steamID], function(err, personas) {
            if (err) {console.log('error.')}
                else {
                    var persona = personas[steamID.getSteamID64()];
                    var name = persona ? persona.player_name : ("[" + steamID.getSteamID64() + "]");

                    client.getSteamLevels([steamID], function(err, results) {
                        if (err) {console.log('error.')}
                            else {
                        var level = results[steamID.getSteamID64()];

                        client.addFriend(steamID);
                        print(`${auto.log(info)} Add User: ${name.yellow}, Steam Leveli: ${level}, İd: ${steamID.getSteamID64().yellow}`);

                        if(config.friends.add_message) {
                            var chat = auto.manageMessage(name)

                            client.chatMessage(steamID, chat);
                            print(`${auto.log(info)} Send Welcome Messages ${name.yellow}`);
                        }
                        }
                    });

                }
            });
    }
});

Link to comment
Share on other sites

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