Jump to content
McKay Development

Recommended Posts

Posted (edited)

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!

Edited by woepertjes
Posted

I added this code:

client.on('groupRelationship', (sid, relationship) => {
            if (relationship === 2) {
                client.respondToGroupInvite(sid, true);
            }
        });

I've tested it and it failed. I have the strongest of feelings that i'm using it wrong.

Posted

That will only respond to invitations that come in while the bot is running. If the invitation was already there when you started up, it won't emit groupRelationship. You want to also check myGroups.

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