-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Comments
Hi, What's the use case here? |
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. |
There is an OAuth scope which allows applications to add users to guilds. This could be used instead. |
Not really the same use case that vexs pointed out |
@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. |
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. |
OAuth scope doesn't let people create invite links for others to join. It also means you lose the discord.gg link. |
+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. |
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. |
@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. |
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. |
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. |
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 |
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. |
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 |
@Abady321x123 what if the invite max limit is 1. |
+1 to this idea. |
@Abady321x123 large amount of users joining from different links at the same time makes that method very problematic. |
+1 |
I think something like this would be super useful. For example in our case: |
Invite metadata already has a |
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. |
@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. |
@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. |
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. |
@Mheetu they already can track numbers by invite.uses, and people can spam to get more link uses, but our request here is different. |
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. |
@Mheetu invite "uses" beside each invite in the invites list, how its difficult? |
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. |
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. |
Any news? we didn't hear anything for more than 3 weeks, not one or two. 😬 |
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). |
Any updates on this feature or are you still busy with GDPR and whatever else? |
There are no updates for this. When we have more we will post. |
But whats the code. |
@ShootingStar-Star i wish they send "invite object" with the guildmemberadd event. |
I believe what this feature will provide once released @SomeoneCares11 |
And/or invite object on the guild member |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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]).
The text was updated successfully, but these errors were encountered: