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

288
Vistas
I have this error when i execute my lyrics command : DiscordAPIError: Cannot send an empty message

Hi can someone help me I have this error when I run my command lyrics: DiscordAPIError: Cannot send an empty message (it's a music bot that uses a command handler) you can contact me on discord : R Λ Z#9217

const { MessageEmbed } = require("discord.js");
const lyricsFinder = require("lyrics-finder");

module.exports = {
      name: "lyrics",
    aliases: ['ly'],
    category: "Music",
    description: "View the lyrics of a song",
    args: false,
    usage: "",
    permission: [],
    owner: false,
    player: true,
    inVoiceChannel: true,
    sameVoiceChannel: true,
execute: async (message, args, client, prefix) => {
  
  const player = message.client.manager.get(message.guild.id);
  
  if (!player.queue.current) {
    let thing = new MessageEmbed()
        .setColor("RED")
        .setDescription("There is no music playing.");
    return message.channel.send(thing);
  }

    let lyrics = null;
    const title = player.queue.current
    try {
      lyrics = await lyricsFinder(player.queue.current.title, "");
      if (!lyrics) lyrics = `No lyrics found for ${title}.`, { title: title }
    } catch (error) {
      lyrics = `No lyrics found for ${title}.`, { title: title }
    }

    let lyricsEmbed = new MessageEmbed()
      .setTitle(`${title} - Lyrics`, { title: title })
      .setDescription(`${lyrics}`)
      .setColor("#F8AA2A")
      .setTimestamp();

      if (lyricsEmbed.description.length >= 2048)
      lyricsEmbed.description = `${lyricsEmbed.description.substr(0, 2045)}...`;
      return message.channel.send(lyricsEmbed).catch(console.error);
        
  }
};
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Updating to v13 will cause a lot of errors because of breaking changes!
You can find them all listed in the guide right here.
But in your case, it was about how Discord.js handles parameters with the channel.send().

 - channel.send(embed);
 + channel.send({ embeds: [embed, embed2] });

 - channel.send('Hello!', { embed });
 + channel.send({ content: 'Hello!', embeds: [embed, embed2] });
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