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

276
Views
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 answers
Answer question

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 Report
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!