Get info of the invite code when user join if they join via a invite link.
This information is not available from the Discord API...yet.
See https://github.com/discordapp/discord-api-docs/issues/448
I wrote a bot to do this with an algorithm, so it's still possible to create.
And how do you code that?
@YukioKeno
Okay thank you. I'll try that :)
Note:
I think this was not relevant in 2018 but nowadays you also have to check for missing invites in your new list as they could be expired by MaxUses.
Furthermore, if there are two or more invites missing and only one of those had MaxUses, this is the invite that has been used. (The others expired by time)
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 GuildInviteCreateEvent.
Most helpful comment
Note:
I think this was not relevant in 2018 but nowadays you also have to check for missing invites in your new list as they could be expired by
MaxUses.Furthermore, if there are two or more invites missing and only one of those had MaxUses, this is the invite that has been used. (The others expired by time)
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
GuildInviteCreateEvent.