#bot mute when join voice channel.

1 messages · Page 1 of 1 (latest)

vernal sleet

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?