Just read the official discord.js documentation. https://discord.js.org/#/docs/main/stable/class/VoiceChannel?scrollTo=createInvite