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

118
Visualizações
Cannot send messages to discord channel anymore

I recently noticed that my discordbot stopped working, I haven't upgraded anything on my server and it just stopped working.

I noticed in the logs. Figured I had old versions of packages and I upgraded to discord.js v13 and everything borked even more.

discclient.channels.fetch(item.channel[i]).send(msgembed)

Now i'm stuck here.

index2.js:46
                                channel.send({ embeds: [msgembed] });
                                        ^

TypeError: Cannot read properties of undefined (reading 'send')

Anyone got an idea? Have they changed alot of stuff?

Thank you!

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

GuildChannelManager#fetch() returns a promise, you have to resolve it before trying to access the channel.

discclient.channels.fetch(item.channel[i])
   .then(channel => channel.send({ embeds: [msgembed] }))
   .catch(console.error);

Guide for Updating from v12 to v13

about 4 years ago · Juan Pablo Isaza Relatório

0

This simply means that the channel doesn't exist. Try fetching and verifying if it found it, before sending the message.

about 4 years ago · Juan Pablo Isaza Relatório
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