Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

247
Vistas
I'm getting the error DiscordAPIError: Cannot send an empty message. in one of my commands it was completely fine yesterday, I didn't change anything

this code is for join-leave-logs in my servers, the code was completely fine yesterday and I didnt change a single thing in it and now im getting an error message whenever someone leaves or joins the server.

client.on('guildMemberAdd', async(member) => { 
  const Channel = member.guild.channels.cache.get('922828509515239426')
  const Channel_chillhub = member.guild.channels.cache.get('876212928041332776')
  const embed = new Discord.MessageEmbed()
      .setColor('AQUA')
      .setAuthor('Member joined', member.displayAvatarURL())
      .setDescription(`**${member.displayName}** Joined ${member.guild.name}`)
      try{
        Channel_chillhub.send({ embeds: [embed] })
      } catch (e){
        Channel.send({ embeds: [embed] })
      }
})
client.on('guildMemberRemove', async(member) => {
  const Channel = member.guild.channels.cache.get('922828509515239426')
  const Channel_chillhub = member.guild.channels.cache.get('876212928041332776')
  const embed = new Discord.MessageEmbed()
      .setColor('RED')
      .setTitle('Member left the server')
      .setDescription(`**${member.displayName}** has left ${member.guild.name}`)
      try{
        Channel_chillhub.send({ embeds: [embed] })
      } catch (e){
        Channel.send({ embeds: [embed] })
      }
})

here's the error message when someone leaves a server: DiscordAPIError: Cannot send an empty message

and here's the error message when someone joins it: TypeError: member.displayAvatarURL is not a function

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

For the error: TypeError: member.displayAvatarURL is not a function, try using member.user.avatarURL() instead of member.displayAvatarURL().

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda