Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord.js v13 joinVoiceChannel

//discord.js and client declaration
const { joinVoiceChannel } = require('@discordjs/voice');
client.on('messageCreate', message => {
    if(message.content === '!join') {
        joinVoiceChannel({
            channelId: message.member.voice.channel.id,
            guildId: message.guild.id,
            adapterCreator: message.guild.voiceAdapterCreator
        })
    }
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #joinVoiceChannel
ADD COMMENT
Topic
Name
7+3 =