Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

319
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda