Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

307
Views
discord bot keeps uploading attachment in a loop. everything else works but the uploading the thumbnail causes an uploading loop. thoughts?

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) 

    }
})
});


about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!