-
-
Notifications
You must be signed in to change notification settings - Fork 734
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
Get invite code on member Join #804
Comments
This information is not available from the Discord API...yet. |
I wrote a bot to do this with an algorithm, so it's still possible to create. |
And how do you code that? |
|
Okay thank you. I'll try that :) |
Note: If two or more invites are missing in your new list you cannot safely assign the used invite. This most likely happens if you forget to cache new invites on |
Although I believe we still cannot get the invite code when a member joins, we can now get the invite code for a member with the new "member search" feature. I hope we can at least get that, so that our bots can just search for the invite code when a new member joins the server. Thanks! Related discussion comment: |
@KaiKikuchi bots cannot access this endpoint. |
This is now possible to retrieve via the API.
{
"guild_id": "{guild-id}",
"members": [
{
"member": {
"avatar": null,
"communication_disabled_until": null,
"flags": 0,
"joined_at": "2024-02-09T15:41:13.354000+00:00",
"nick": null,
"pending": false,
"premium_since": null,
"roles": [],
"unusual_dm_activity_until": null,
"user": {
"id": "example-id",
"username": "example-username",
"avatar": "2699fbf2e65df3ee85ecd2a84ce45cac",
"discriminator": "0",
"public_flags": 0,
"premium_type": 0,
"flags": 0,
"banner": null,
"accent_color": null,
"global_name": "Example Name",
"avatar_decoration_data": null,
"banner_color": null
},
"mute": false,
"deaf": false
},
"source_invite_code": "XHVBNhMuUw",
"join_source_type": 5,
"inviter_id": "203200098426028526"
}, {...}
],
"page_result_count": 126,
"total_result_count": 126
} Originally found here: discord/discord-api-docs#3210 |
Good chances it won't be added until it's documented |
This endpoint is still unfinished and not intended to be used in production. JDA does not support unfinished API features. |
Yep. I am aware both of what you are saying is correct however I wanted to make it visible to those who want/need to use it even before it is added to the JDA. |
General Troubleshooting
Issue
Issue Type
Description
Get info of the invite code when user join if they join via a invite link.
The text was updated successfully, but these errors were encountered: