Random Posted January 3, 2017 Report Posted January 3, 2017 I'm still pretty new and I've been tinkering around with this. I got friend requests to auto accept with. client.on('friendRelationship', function(steamID, relationship) { if (relationship == SteamUser.Steam.EFriendRelationship.RequestRecipient) { client.addFriend(steamID); console.log("Added " + steamID.getSteam3RenderedID() + "!"); } }); How would I auto accept group invites? Thanks! Quote
Dr. McKay Posted January 3, 2017 Report Posted January 3, 2017 Detect a group invite using: https://github.com/DoctorMcKay/node-steam-user#grouprelationship Respond to an invite using: https://github.com/DoctorMcKay/node-steam-user#respondtogroupinvitegroupsteamid-accept Quote
Random Posted January 3, 2017 Author Report Posted January 3, 2017 (edited) I tried it... But don't think I did it right since it crashes when I get invited. I definitely need more practice! client.on('groupRelationship', function(steamID, relationship) { if(relationship === Steam.EClanRelationship.Invited) { client.respondToGroupInvite(accept, true); console.log("Joined Group " + steamID.getSteam3RenderedID() + "!"); } }); (Accidentally posted in wrong thread I was reading) Edited January 3, 2017 by Random Quote
Dr. McKay Posted January 3, 2017 Report Posted January 3, 2017 What is the stack trace when it crashes? Quote
Random Posted January 3, 2017 Author Report Posted January 3, 2017 I changed, if(relationship === Steam.EClanRelationship.Invited) { to if(relationship == SteamUser.Steam.EClanRelationship.Invited) { but now I'm getting ReferenceError: accept is not defined at SteamUser.<anonymous> (C:\Users\Random\Files\bottttttttttt\node-steam-user-master\bot\random.js:63:37) at emitTwo (events.js:106:13) at SteamUser.emit (events.js:191:7) at SteamUser._emitIdEvent (C:\Users\Random\Files\bottttttttttt\node-steam-user-master\components\utility.js:29:12) at C:\Users\Random\Files\bottttttttttt\node-steam-user-master\components\friends.js:415:9 at Array.forEach (native) at SteamUser._handlers.(anonymous function) (C:\Users\Random\Files\bottttttttttt\node-steam-user-master\components\friends.js:393:23) at SteamUser._handleMessage (C:\Users\Random\Files\bottttttttttt\node-steam-user-master\components\messages.js:202:29) at emitThree (events.js:116:13) at CMClient.emit (events.js:194:7) I don't know how to write this part... Quote
Dr. McKay Posted January 3, 2017 Report Posted January 3, 2017 The first argument should be the group's SteamID. Quote
zacky1256 Posted June 13, 2017 Report Posted June 13, 2017 I got it thanks!Hey may i have the full code fixed plzzz i really need this for my bot an ive searched everywhere Quote
jafix Posted June 14, 2017 Report Posted June 14, 2017 Hey may i have the full code fixed plzzz i really need this for my bot an ive searched everywhereLook at the posts above you. It's literally there. Quote
zacky1256 Posted June 14, 2017 Report Posted June 14, 2017 Look at the posts above you. It's literally there.No its not he asked for help cause it didnt work and he finally fixed his problem at the end but he didnt share the code when everything was fixed so i think u should take a look at the post again Quote
Vanilla Posted June 15, 2017 Report Posted June 15, 2017 (edited) Hey may i have the full code fixed plzzz i really need this for my bot an ive searched everywhereThis will accept ALL incoming group invite client.on('groupRelationship', function (steamID, relationship) { if (relationship == SteamUser.Steam.EClanRelationship.Invited){ client.respondToGroupInvite(steamID, true); } }); Edited June 15, 2017 by Vanilla Quote
zacky1256 Posted June 15, 2017 Report Posted June 15, 2017 This will accept ALL incoming group invite client.on('groupRelationship', function (steamID, relationship) { if (relationship == SteamUser.Steam.EClanRelationship.Invited){ client.respondToGroupInvite(steamID, true); } });thx Quote
zacky1256 Posted June 15, 2017 Report Posted June 15, 2017 This will accept ALL incoming group invite client.on('groupRelationship', function (steamID, relationship) { if (relationship == SteamUser.Steam.EClanRelationship.Invited){ client.respondToGroupInvite(steamID, true); } });do u have an auto invite all friends to a pecifik group? that i can add to my bot Quote
Revadike Posted June 15, 2017 Report Posted June 15, 2017 do u have an auto invite all friends to a pecifik group? that i can add to my botWe are not here to code for you buddy Quote
zacky1256 Posted June 16, 2017 Report Posted June 16, 2017 We are not here to code for you buddyDude if u dont have the answer then dont answer cause if u read my comment did i ask him if he also had the other code that if he had i could get it i didnt say he should code so mind your own business Quote
Vanilla Posted June 17, 2017 Report Posted June 17, 2017 do u have an auto invite all friends to a pecifik group? that i can add to my botUse 'inviteToGroup(userSteamID, groupSteamID)' It's possible to send a lot people to spesific group, but just like the wiki said: "sending automated group invites is a violation of the Steam Subscriber Agreement and can get you banned." Quote
Recommended Posts
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.