Is there any way to see the used invite code on GuildMemberAdd event?

I have seen some posts on Github about it but I didn't find anything that indicates if I can get the used invite code when the member enter your guild. there's a code explaning what I would like to know:
client.on(Events.GuildMemberAdd, async (arg) => {
arg // <-- is there any way to get the invite code used by the member from here?
})
client.on(Events.GuildMemberAdd, async (arg) => {
arg // <-- is there any way to get the invite code used by the member from here?
})
If not, have any other way that you guys know?
4 Replies
d.js toolkit
d.js toolkit23h ago
d.js docs
d.js docs23h ago
tag suggestion for @Carvalinho 立裴: Discord does not provide the invite that a member used to join through the bot API. - Tracking the uses of invites through the inviteCreate and guildMemberAdd events is unreliable and we recommend against it. - Discord has not shared any plans to make the members tab available for bots.
Carvalinho 立裴
Carvalinho 立裴OP23h ago
As I thought, thank you very much!
d.js toolkit
d.js toolkit23h ago
The thread owner has marked this issue as solved.

Did you find this page helpful?