I have used the following code. However for whatever reason it just keeps looping the uploading of the attachment. the music playing portion works just fine but other than that it just attempts to upload the attachment in a loop. does anybody have any idea what is the casue of this?
Thank you in advance
client.on('messageCreate', async (message) => {
if (message.content && message.content.toLowerCase() === '!play baka radio') {
if (!message.member.voice?.channel) return message.channel.send('You need to be a voice channel to execute this command')
const connection = joinVoiceChannel({
channelId: message.member.voice.channelId,
guildId: message.guildId,
adapterCreator: message.guild.voiceAdapterCreator
})
> ***the code starts a loop and i am not sure what is causing this ***
const player = createAudioPlayer()
const resource = createAudioResource('https://nrf1.newradio.it:10328/alfaanime')
connection.subscribe(player)
message.channel.send({ content: "Now Playing", embeds: [embed2], files: ['./logo/bkrlogo.png'] }) + player.play(resource)
}
})
});