Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

260
Visualizações
Discord Bot Embed devuelve "No se puede enviar un mensaje vacío"

He estado reelaborando mi comando de ayuda, que incluye hacer un nuevo Discord Embed, pero cada vez que intento ejecutar el comando, se bloquea en la consola con

DiscordAPIError: No se puede enviar un mensaje vacío

Intenté rehacer la inserción (usando esta herramienta ya que todas sus incrustaciones se hicieron usando esto) y la revisé varias veces sin que nada al menos obvio para mí pudiera causar el error.

Mi código:

 module.exports = { name: 'help', description: 'Get help on anything from commands, to what the bot does! just not your homework..', syntax: '<Command>', execute(client, message, args) { const footerTxt = require('../config.json') const Embed = { "title": "HELP SEYMOUR! THE BOT IS ON FIRE!", "description": "Get help on anything from commands, to what the bot does! just not your homework..", "color": 9442302, "footer": { "icon_url": message.author.displayAvatarURL, "text": footerTxt + " | No mother it's just the northern lights" }, "fields": [ { "name": "Arguments", "value": "<> is optionable,\n[ ] is required. \n ```<Command>```" }, { "name": "...Or is the bot actually on fire?", "value": "<> is optionable,\n[ ] is required. \n ```<Command>```" } ] }; message.channel.send({ Embed }); }};

Está usando Discord.JS v12

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Como de costumbre, siempre son las pequeñas cosas que uno tiende a pasar por alto. El problema se debía a la falta de paréntesis en el message.author.displayAvatarURL

Haciendo que el código final sea:

 name: 'help', description: 'Get help on anything from commands, to what the bot does! just not your homework..', syntax: '<Command>', execute(client, message, args) { const {footerTxt} = require('../config.json'); const Embed = { "title": "HELP SEYMOUR! THE BOT IS ON FIRE!", "description": "Get help on anything from commands, to what the bot does! just not your homework..", "color": 9442302, "footer": { "icon_url": message.author.displayAvatarURL, "text": footerTxt + " | No mother it's just the northern lights" }, "fields": [ { "name": "Arguments", "value": "<> is optionable,\n[ ] is required. \n ```<Command>```" }, { "name": "...Or is the bot actually on fire?", "value": "Join the [support server!]( )" } ] }; message.channel.send({ Embed }); }};
about 4 years ago · Juan Pablo Isaza Relatório

0

"text": footerTxt + " | No mother it's just the northern lights"

convertirlo en

 "text": `${footerTxt}` + " | No mother it's just the northern lights"

Podría funcionar el código

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda