seishun / node-steam

Interface directly with Steam servers from Node.js
MIT License
1.01k stars 181 forks source link

How to handle Friend Invites #7

Closed awillinger closed 11 years ago

awillinger commented 11 years ago

Hello,

I am currently coding a Bot for Steam Trading, which also should/must accept Friend Requests. The thing is, I can't get it to work.

Here is an example:

bot.on('relationship', function(other, type){
    if(type == Steam.EFriendRelationship.PendingInvitee)
    {
       bot.addFriend(other);
    }
});

(bot = my SteamClient Object)

It receives the Invite, but accepting doesn't seem to work - the Bot is igoring the User afterwards, which makes sending a new Invite impossible.

What am I doing wrong?

seishun commented 11 years ago

You're doing it right and that's how I do it, too. Is this reproducible every time?

AFAIK, you get an "ignoring you" error if you add someone, then revoke the request, then try to add again.

awillinger commented 11 years ago

Ah yes, now it's working!