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

499
Views
No se puede enviar el mensaje incrustado en discord.js v13

para que el bot funcione sin problemas con estos códigos, todos los comandos de prefijo funcionan excepto el mensaje de inserción. Cuando quiero enviar un mensaje incrustado, aparece un error (el bot no envió ningún mensaje incrustado y se desconectó unos minutos después)

Códigos:

 const Discord = require('discord.js'); const client = new Discord.Client({ intents: 32767 }); const { MessageEmbed } = require('discord.js'); client.on('ready', () => { console.log('Bot is online!'); }); client.on('messageCreate', (message) => { const prefix = '.'; if (!message.content.startsWith(prefix)) return; if (message.content === `${prefix}hello`) { message.channel.send("Hello, I'm IRFAN\nIntegrted Robot For Assistant Needs\nI'm Currently In Development"); } if (message.content === `${prefix}embed`) { let embed = new Discord.MessageEmbed() .setTitle("Title") .setDescription("Description") .setColor("#0099ff") message.channel.send({embed:[embed]}); } }); client.login('token censored');

Terminal:

 throw new DiscordAPIError(data, res.status, request); ^ DiscordAPIError: Cannot send an empty message at RequestHandler.execute (C:\Users\M. IRFAN NAZRIL\Documents\Belajar Coding\discord bot\node_modules\discord.js\src\rest\RequestHandler.js:350:13) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async RequestHandler.push (C:\Users\M. IRFAN NAZRIL\Documents\Belajar Coding\discord bot\node_modules\discord.js\src\rest\RequestHandler.js:51:14) at async TextChannel.send (C:\Users\M. IRFAN NAZRIL\Documents\Belajar Coding\discord bot\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:176:15) { method: 'post', path: '/channels/990157044688494663/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: [] } }

Dice "tts: falso", pero he permitido todos los permisos en discordia.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Enviaste el mensaje incorrectamente. Debería ser:

 message.channel.send({ embeds: [embed] })
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!