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

97
Vistas
Discord APIerror

I am having issues with sending discord embeds. This is my code:

module.exports = {
    name: 'tiktok',
    description: "sends tiktok link",
    execute(message, args, Discord) {
        const newEmbed = new Discord.MessageEmbed()
        .setColor('#228B22')
        .setTitle('Tiktok')
        .setURL('https://www.tiktok.com/@elcattuccino?lang=en')
        .setDescription('tiktok link for the discord server')
        .addFields(
            {name: 'Tiktok', value:'heres the tiktok link'},
        )
        .setImage('https://cdn.discordapp.com/avatars/752212130870329384/6a16609eafc28f95ad8f64e80ffcc24e.png?size=80')
        .setFooter('check out the tiktok');
        
        message.channel.send(newEmbed);
    }
}

But I get this error:

throw new DiscordAPIError(data, res.status, request); ^

DiscordAPIError: Cannot send an empty message at RequestHandler.execute (C:\Users\willm\OneDrive\Desktop\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:349:13) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async RequestHandler.push (C:\Users\willm\OneDrive\Desktop\Discord Bot\node_modules\discord.js\src\rest\RequestHandler.js:50:14) at async TextChannel.send (C:\Users\willm\OneDrive\Desktop\Discord Bot\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:172:15) { method: 'post', path: '/channels/910099863180550144/messages',
code: 50006, httpStatus: 400, requestData: { json: { content: undefined, tts: false, nonce: undefined, embeds: undefined, components: undefined, username: undefined, avatar_url: undefined, allowed_mentions: undefined, flags: undefined, message_reference: undefined, attachments: undefined, sticker_ids: undefined }, files: [] } }

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

0

If you're using discord.js v13, you should send an embed like this as you can send up to 10 embeds now:

message.channel.send({ embeds: [newEmbed] });

The embed option was removed and replaced with an embeds array, which must be in the options object. More info

about 4 years ago · Juan Pablo Isaza Denunciar

0

Use message.channel.send({ embeds: [newEmbed] });

Also field has changed

.addField('LINK', '[LINK](TIKTOK LINK)', true) like this

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