Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Feature Request: Track invite used. #448

Closed
LaxSlash opened this issue Dec 10, 2017 · 38 comments
Closed

API Feature Request: Track invite used. #448

LaxSlash opened this issue Dec 10, 2017 · 38 comments
Assignees
Labels
feature request planned We're going to fix this pretty soon

Comments

@LaxSlash
Copy link
Contributor

Feature request to include the invite code used as well as the inviting member in the member join event. Alternatively, include invite used information in the member object (invited-by: [USER SNOWFLAKE]).

@jhgg
Copy link
Contributor

jhgg commented Dec 10, 2017

Hi,

What's the use case here?

@Vexs
Copy link

Vexs commented Dec 10, 2017

Handy for bot-logging, so you can tell what invite is being used for raids, or if unsavory people are joining, you can find out how. Currently can be done by polling the invite list for increments, but thats unreliable at times.

Similar vein, a create invite event would be nice.

@MinnDevelopment
Copy link
Contributor

There is an OAuth scope which allows applications to add users to guilds. This could be used instead.

@cryptiklemur
Copy link
Contributor

Not really the same use case that vexs pointed out

@s5bug
Copy link

s5bug commented Dec 11, 2017

@MinnDevelopment vexs means that when a user joins, the invite information would be sent in an event. Not add a user to a guild using an invite.

@MinnDevelopment
Copy link
Contributor

He is talking about adding this for raid prevention, I'm just saying that this OAuth scope already makes this possible as it gives full control over who gets added in the first place making this information available.

@cryptiklemur
Copy link
Contributor

OAuth scope doesn't let people create invite links for others to join. It also means you lose the discord.gg link.

@Mheetu
Copy link

Mheetu commented Jan 6, 2018

+1 Would be helpful to find out who keeps inviting ban evaders/troublemakers.

On a side note, I'd also like to see this information in the user's profile within the client. An admin shouldn't have to write a bot to figure it out.

I'd honestly like to see the HTTP REFERRER header information too if it was defined when the user joined through discord.gg... though I can imagine that may raise some privacy issues, inconsistent data, or even spoofed data. But it'd still help to know where users are posting invites to your server.

I don't see OAuth as a viable solution to this, it's more of an inconvenient workaround for those who don't don't require that flow.

@Cynosphere
Copy link

A current way to do this is to be able to check the invites that exist at the current point in time, store them yourself, then on member join, check which invite count updated that way. I don't know if this is possible but it should be as long as the bot has perms to make invites I think.

@eritbh
Copy link
Contributor

eritbh commented Jan 19, 2018

@BoxOfFlex I feel like there would be some edge cases with that method, for example when two invites are used by two different users at once. You might also have to handle single-use invites differently. Not impossible to implement, but not perfect either.

@Seklfreak
Copy link

Another issue of polling the existing invites are that vanity invites for partners are not listed in the server invites.

Including the used invite in the member join event would provide a much cleaner way to track invites. It would also reduce the HTTP API traffic as you don't have to request all server invites for every member joining a server.

@eritbh
Copy link
Contributor

eritbh commented Jan 19, 2018

Now that I think about it, that would actually be a massive pain to implement... You'd have to also watch for when invites are invalidated to make sure your cache stays up-to-date so users don't get associated with two invites. And yeah, even that's assuming that you don't have a vanity link, that would mess everything up.

@CEbbinghaus
Copy link

this would make referring easier for bot programmers. im currently working on a system where people invite multiple friends and get a role as a reward. this would make my life a lot easier

@danbopes
Copy link

Right now, my use case is this: A user joins the server. I'd like to detect if the invite link used was temporary or permanent, and if a permanent one, then shoot a DM to the person explaining how to use the bots within discord.

@iiAbady
Copy link

iiAbady commented Apr 22, 2018

You can just track the invites, and see which one of them increases when a guild event happen. but this request will make every thing easy

@SomeoneCares11
Copy link

@Abady321x123 what if the invite max limit is 1.

@Tylertron1998
Copy link

+1 to this idea.

@s5bug
Copy link

s5bug commented May 2, 2018

@Abady321x123 large amount of users joining from different links at the same time makes that method very problematic.

@jellz
Copy link

jellz commented May 3, 2018

+1

@thibaultmol
Copy link

I think something like this would be super useful. For example in our case:
We want to have a seperate invite link for Twitter, Facebook, Reddit (individual subreddits we posted in),.... So we actually know what social media sources we're getting the most users from

@SinisterRectus
Copy link
Contributor

Invite metadata already has a uses field for that.

@b1naryth1ef
Copy link
Contributor

Hey folks, we've discussed this request internally and agreed that it's got a lot of good use cases. I've worked on an implementation, and we have something we think will work well for this. I don't have a timeline for getting it out in the wild yet, but hopefully we'll have more information in the next week or two.

@b1naryth1ef b1naryth1ef added planned We're going to fix this pretty soon enhancement labels May 4, 2018
@Mheetu
Copy link

Mheetu commented May 7, 2018

@CEbbinghaus, while I definitely want this feature implemented... I'd say the scenario you mentioned is arguably a reason to avoid, or at the very least, be weary towards it's implementation.

I've experienced first-hand what happens when users are encouraged through tiered rewards to refer users to a server. While it may not be the case in all situations, it often results in those users joining other servers, spamming every channel, spamming individual users with DMs, and even creating bots specifically for the purpose of spamming their invite links.

As I stated at the beginning, I definitely see a need for this feature to be implemented... but I do think a discussion needs to take place on ways to reduce invite spam as it will definitely lead to more, both on the platform and off.

@b1naryth1ef
Copy link
Contributor

@Mheetu spamming invites in other servers is a violation of our terms and folks who choose to do this are generally caught and handled (read; banned) by our automated abuse systems.

@Mheetu
Copy link

Mheetu commented May 7, 2018

I'm aware of that, and it seems to work fairly well in your average gaming community where server owners don't care much about numbers. However, get more into other niche communities where admins benefit from larger communities and it's still an issue.

For instance, I've been in a few crypto coin servers and I often find myself getting DMs inviting me to "pump-and-dump" servers where the owners have rigged up a bot to essentially reward users based on their number of referrals. So it actually becomes a monetary incentive to get more referrals.

For most use-cases, I agree, this won't be an issue. But I think it'd be naive to ignore that it will increase invite spam to some degree, especially off-platform spam. Just something to keep in mind.

@SomeoneCares11
Copy link

@Mheetu they already can track numbers by invite.uses, and people can spam to get more link uses, but our request here is different.
if bad people joined your server, you'll know which link they came from. to stop that link, also if you have PUBG role you can give it to everyone joined via specific link, and so on.
there are no bad things will happen from this feature.

@Mheetu
Copy link

Mheetu commented May 7, 2018

They can, indeed. But it's difficult to do, adding a proper API for it will simplify the process and therefore increase the number of those doing it.

Again, I'm not saying I'm against the feature, I'd find it extremely useful as a server owner/community manager. But it will definitely increase the amount of abuse and that's something that Discord should look out and be prepared for.

@SomeoneCares11
Copy link

@Mheetu invite "uses" beside each invite in the invites list, how its difficult?
they can reward members using that number, what is the different here?
with the new feature they will know who invite specific user, i gave you examples for use cases above.
which i think rewards not one of the use cases, and this feature will not cause any spam to discord
Its just an extra thing to help bots do amazing things.

@schnapster
Copy link
Contributor

I second what @Mheetu has said so far.

I am developing a bot that actually does something useful with DMs (sending private information so users can play a game with different roles). This, of course, requires the users to have DMs enabled if they want to play that game. Which sadly opens them up to be abused by spammers. I'm having a hard time ensuring a smooth experience for users so that they are not bothered by random spammers joining our game server. Adjusting privacy settings all the time makes for a very bad experience. The change discussed in this issue will increase the incentives to spam and advertise in DMs even further. I hope that Discord ups their measures against it a notch as part of rolling out premium invite tracking for the spammers. Of course, we only see those malicious users get through, so maybe the system employed behind the scenes is super effective, but tbh it does not feel like that. On a ~100k member guild (unrelated to the bot mentioned above), we have almost 4.5k bans, a vast majority of which are due to advertising (both in channels and via DMs). Many more get just kicked and not actually banned.

@b1naryth1ef
Copy link
Contributor

This isn't the appropriate thread for this discussion. Invite spamming and TOS abuse are an entirely separate problem outside of the implementation of this feature. We have various internal tools which track and handle the types of abuse you've all described here. If your seeing prolific abuse of the invite system, or TOS violations in any form you should reach out to our support team (support@discordapp.com) to report the malicious behavior.

@SomeoneCares11
Copy link

Any news? we didn't hear anything for more than 3 weeks, not one or two. 😬

@jhgg
Copy link
Contributor

jhgg commented May 27, 2018

It’s still on the roadmap. Our team is very busy right now though so this is relatively low priority relative to other things (such as GDPR).

@HelpfulStranger999
Copy link

Any updates on this feature or are you still busy with GDPR and whatever else?

@jhgg
Copy link
Contributor

jhgg commented Jun 9, 2018

There are no updates for this. When we have more we will post.

@atchisontopekasantafe
Copy link

But whats the code.

@SomeoneCares11
Copy link

@ShootingStar-Star i wish they send "invite object" with the guildmemberadd event.

@HelpfulStranger999
Copy link

I believe what this feature will provide once released @SomeoneCares11

@HelpfulStranger999
Copy link

And/or invite object on the guild member

@discord discord locked as off-topic and limited conversation to collaborators Jul 4, 2018
@discord discord deleted a comment from SomeoneCares11 Jul 8, 2018

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
feature request planned We're going to fix this pretty soon
Projects
None yet
Development

No branches or pull requests