How to create voice channel link

Cahan uuu

I'm trying to make an embed link to a clickable audio channel in Discord for example this way: Click to Join But in the MessageEmbed This Code:

     if(message.member.voice.channelID == null) return message.channel.send('null')
     
     message.delete()
     
     let link = 'https://discord.com/channels/' + message.guild.id + '/' + message.member.voice.channelID
     
     message.channel.send(new Discord.MessageEmbed()
     .setDescription('[Click to Join](' + `${link}` + ')'));

Probably my fault is on the link, I could not find anything on the internet.

Bqre

Discord at the moment does not let you join a voice channel through it's channel's link, but rather through an invite, that can be created through the Channel#createInvite() method.

We can create an invite to our voice channel, and send the invite through an embed to join through.

Final Code

if (message.member.voice.channelID == null) return message.channel.send('null')
     
message.delete()
let invite = await message.member.voice.channel.createInvite()
let link = `https://discord.gg/${invite.code}`
const embed = new Discord.MessageEmbed().setDescription(`[This](${link}) is a test`);
    
message.channel.send(embed);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to link Twilio Voice with Taskrouter?

From Dev

How to get the time spent speaking in a voice channel?

From Dev

How to link to an entry in a channel in expressionengine?

From Java

How can I kick member from voice channel? (DSharpplus)

From Dev

Discord py how can I join a voice channel

From Dev

How can I get when the bot is kicked of a voice channel

From Dev

How do I get total text and voice channel count in numbers

From Dev

How to create a channel then find the ID

From Dev

How to create channel with socket in Python

From Dev

How to create a LIFO Queue Channel

From Dev

How to create a Discord channel with parent?

From Dev

How to create a channel then find the ID

From Dev

How to create channel with socket in Python

From Dev

How to create a custom channel in SystemC?

From Dev

How to create a channel path with BigQuery?

From Dev

How to create a notification channel group?

From Dev

How do I link a headervaluerouter to input channel?

From Dev

How to create link for Mpdf?

From Dev

How to create tab into a link

From Dev

How to create delete link

From Dev

How create link in jQuery?

From Dev

How to create delete link

From Dev

How to create tab into a link

From Dev

How To Create A Link In Jquery

From Dev

How to access which voice channel user writing command is in discord.py?

From Dev

How to create an Android Wear app with the note-taking voice action?

From Dev

How to create voice command inside immersion app - gdk

From Dev

How to create a channel from another with transducers?

From Dev

How to create channel interceptor programmatically in spring