I have a site where users register. In the registration process, I ask them to provide their discord user to let them access a discord community we own.
Is it possible t
It is possible to create a unique invite, but you cannot send it to the user inside Discord, you'll need to show the link in your webpage: bots cannot message users that are not in a mutual guild, to prevent spamming.
To create an invite you can use the GuildChannel.createInvite() method:
let newInvite = await channel.createInvite({
maxUses: 1, // After one use it will be void
unique: true, // That tells the bot not to use an existing invite so that this will be unique
maxAge: 86400 // By default invites last 24 hours. If you want to change that, modify this (0 = lasts forever, time in seconds)
});