bot mute when join voice channel.

const connection = joinVoiceChannel({
channelId: message.member.voice.channelId,
guildId: message.guildId,
adapterCreator: message.guild.voiceAdapterCreator
})

const player = createAudioPlayer()
const resource = createAudioResource('../music/123.mp3', {
metadata: {
title: 'A good song!',
},
});

connection.subscribe(player)

player.play(resource)

await wait(10000)
console.log("time")
connection.destroy();
}
}

can you check my code?
unknown.png
Was this page helpful?